<div>
    
    <div class="fixed top-0 left-0 right-0 w-full bg-white flex items-center justify-between p-4 z-50 border-b border-gray-200">
        <div class="flex items-center">
            <img src="<?php echo e(Storage::url('images_static/tresipunt-square.svg')); ?>" alt="Logo" class="w-10 h-10 mr-3">
            <h1 class="text-2xl font-bold">Editar archivo SCSS CDN</h1>
        </div>
        <div class="flex items-center gap-3">
            <a href="<?php echo e(route('products.scss-cdn.bundle.show', [$product, $bundle])); ?>"
                class="text-gray-700 hover:text-gray-900 px-4 py-2">
                Cancelar
            </a>
            <button type="submit" form="file-edit-form"
                    wire:loading.attr="disabled"
                    class="bg-3ip hover:bg-3ip-light text-white px-4 py-2 rounded-lg disabled:opacity-50 disabled:cursor-not-allowed">
                <span wire:loading.remove>Guardar cambios</span>
                <span wire:loading>Guardando...</span>
            </button>
        </div>
    </div>

    
    <div class="w-full px-20 pt-24 pb-8">
        <div class="mx-auto max-w-6xl">
            
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session()->has('success')): ?>
                <div class="mb-4 rounded bg-green-100 px-4 py-2 text-green-700">
                    <?php echo e(session('success')); ?>

                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <?php if(session()->has('error')): ?>
                <div class="mb-4 rounded bg-red-100 px-4 py-2 text-red-700">
                    <?php echo e(session('error')); ?>

                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            
            <div class="w-full rounded-lg bg-white border border-gray-200 px-8 py-6 mb-6">
                <div class="mb-4">
                    <h3 class="text-lg font-semibold text-gray-900">Archivo: <?php echo e($file->relative_path); ?></h3>
                    <?php
                        $fileContent = \App\Services\ScssCdn\ScssCdnStorageService::getFile($product, $bundle, $file->relative_path);
                        $fileSize = $fileContent ? strlen($fileContent) : 0;
                    ?>
                    <p class="text-sm text-gray-600 mt-1">Tamaño: <?php echo e(number_format($fileSize, 0, ',', '.')); ?> bytes</p>
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-2">URL securizada:</label>
                    <div class="flex items-center gap-2">
                        <input type="text"
                               value="<?php echo e($fileUrl); ?>"
                               readonly
                               class="flex-1 rounded-lg border border-gray-200 px-4 py-2 bg-gray-50 font-mono text-sm">
                        <button onclick="copiarAlPortapapeles('<?php echo e($fileUrl); ?>')"
                                class="rounded-lg bg-gray-600 px-4 py-2 text-white hover:bg-gray-700 text-sm font-semibold">
                            Copiar
                        </button>
                    </div>
                </div>
            </div>

            
            <div class="w-full rounded-lg bg-white border border-gray-200 px-8 py-6">
                <form wire:submit.prevent="save" id="file-edit-form">
                    <div class="mb-4">
                        <div class="flex items-center justify-between mb-2">
                            <label class="block text-sm font-medium text-gray-700">
                                Contenido SCSS
                            </label>
                            
                        </div>

                        <?php if (isset($component)) { $__componentOriginal307970850a74e25f1bf8f725b1490b97 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal307970850a74e25f1bf8f725b1490b97 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.editor-de-codigo','data' => ['id' => 'scss-editor','lenguaje' => 'scss','estado' => 'content','valor' => $content,'filas' => 20,'error' => $errors->has('content')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('editor-de-codigo'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'scss-editor','lenguaje' => 'scss','estado' => 'content','valor' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($content),'filas' => 20,'error' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->has('content'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal307970850a74e25f1bf8f725b1490b97)): ?>
<?php $attributes = $__attributesOriginal307970850a74e25f1bf8f725b1490b97; ?>
<?php unset($__attributesOriginal307970850a74e25f1bf8f725b1490b97); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal307970850a74e25f1bf8f725b1490b97)): ?>
<?php $component = $__componentOriginal307970850a74e25f1bf8f725b1490b97; ?>
<?php unset($__componentOriginal307970850a74e25f1bf8f725b1490b97); ?>
<?php endif; ?>

                        
                        <?php if (isset($component)) { $__componentOriginalf008308a8e7a75a8ac5cae5864a3d051 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf008308a8e7a75a8ac5cae5864a3d051 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.revision-del-codigo','data' => ['avisos' => $revision]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('revision-del-codigo'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['avisos' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($revision)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf008308a8e7a75a8ac5cae5864a3d051)): ?>
<?php $attributes = $__attributesOriginalf008308a8e7a75a8ac5cae5864a3d051; ?>
<?php unset($__attributesOriginalf008308a8e7a75a8ac5cae5864a3d051); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf008308a8e7a75a8ac5cae5864a3d051)): ?>
<?php $component = $__componentOriginalf008308a8e7a75a8ac5cae5864a3d051; ?>
<?php unset($__componentOriginalf008308a8e7a75a8ac5cae5864a3d051); ?>
<?php endif; ?>

                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['content'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <p class="text-red-600 text-sm mt-1"><?php echo e($message); ?></p>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                    </div>
                </form>
            </div>
        </div>
    </div>

</div><?php /**PATH /var/www/html/resources/views/livewire/scss-cdn/file-edit.blade.php ENDPATH**/ ?>