<?php if (isset($component)) { $__componentOriginale9b1828e76ebe0c7e000efe9977b8aa6 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale9b1828e76ebe0c7e000efe9977b8aa6 = $attributes; } ?>
<?php $component = App\View\Components\Layouts\AuthLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('layouts.auth-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Layouts\AuthLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <?php if($sectionTemplate): ?>
        <div class="flex flex-wrap gap-2 py-4">
            <span class="text-[#6a7681] text-base font-medium leading-normal"><?php echo e($sectionTemplate->templateName); ?></span>
            <span class="text-[#6a7681] text-base font-medium leading-normal">/</span>
            <a class="text-[#6a7681] text-base font-medium leading-normal transition-all duration-300 hover:text-primary100"
                href="<?php echo e(route('contract-sections.index', $sectionTemplate->id)); ?>">
                <?php echo e($sectionTemplate->title); ?>

            </a>
            <span class="text-[#6a7681] text-base font-medium leading-normal">/</span>
            <span class="text-[#121416] text-base font-medium leading-normal">Nueva sección</span>
        </div>
    <?php endif; ?>

    <div class="flex flex-col max-w-[640px]">
        <form action="<?php echo e(route('contract-sections.store')); ?>" method="POST" x-data="{ omitRules: <?php echo e(old('omit_rules') ? 'true' : 'false'); ?> }">
            <?php echo csrf_field(); ?>
            <div class="flex flex-wrap justify-between gap-3 py-4">
                <h2 class="text-complement300 font-main text-size-subtitle font-medium">Nueva sección</h2>
            </div>
            <?php if (isset($component)) { $__componentOriginal4267f678981d2f20451786dbd2cdc8b4 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal4267f678981d2f20451786dbd2cdc8b4 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.validation-errors','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.validation-errors'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal4267f678981d2f20451786dbd2cdc8b4)): ?>
<?php $attributes = $__attributesOriginal4267f678981d2f20451786dbd2cdc8b4; ?>
<?php unset($__attributesOriginal4267f678981d2f20451786dbd2cdc8b4); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal4267f678981d2f20451786dbd2cdc8b4)): ?>
<?php $component = $__componentOriginal4267f678981d2f20451786dbd2cdc8b4; ?>
<?php unset($__componentOriginal4267f678981d2f20451786dbd2cdc8b4); ?>
<?php endif; ?>

            <input type="hidden" name="template_section_id" value="<?php echo e($idTemplateSection); ?>">
            
            
            <?php if (isset($component)) { $__componentOriginal4df4c1f4c446d9abdb436534729bd386 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal4df4c1f4c446d9abdb436534729bd386 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.input','data' => ['type' => 'title','name' => 'title','placeholder' => 'Escribe el título','label' => 'Título','value' => ''.e(old('title')).'','required' => true,'autofocus' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'title','name' => 'title','placeholder' => 'Escribe el título','label' => 'Título','value' => ''.e(old('title')).'','required' => true,'autofocus' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal4df4c1f4c446d9abdb436534729bd386)): ?>
<?php $attributes = $__attributesOriginal4df4c1f4c446d9abdb436534729bd386; ?>
<?php unset($__attributesOriginal4df4c1f4c446d9abdb436534729bd386); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal4df4c1f4c446d9abdb436534729bd386)): ?>
<?php $component = $__componentOriginal4df4c1f4c446d9abdb436534729bd386; ?>
<?php unset($__componentOriginal4df4c1f4c446d9abdb436534729bd386); ?>
<?php endif; ?>
            
            
            <?php if (isset($component)) { $__componentOriginal4df4c1f4c446d9abdb436534729bd386 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal4df4c1f4c446d9abdb436534729bd386 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.input','data' => ['type' => 'number','name' => 'order','placeholder' => 'Escribe el orden de prioridad','label' => 'Orden','value' => ''.e(old('order')).'','required' => true,'autofocus' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'number','name' => 'order','placeholder' => 'Escribe el orden de prioridad','label' => 'Orden','value' => ''.e(old('order')).'','required' => true,'autofocus' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal4df4c1f4c446d9abdb436534729bd386)): ?>
<?php $attributes = $__attributesOriginal4df4c1f4c446d9abdb436534729bd386; ?>
<?php unset($__attributesOriginal4df4c1f4c446d9abdb436534729bd386); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal4df4c1f4c446d9abdb436534729bd386)): ?>
<?php $component = $__componentOriginal4df4c1f4c446d9abdb436534729bd386; ?>
<?php unset($__componentOriginal4df4c1f4c446d9abdb436534729bd386); ?>
<?php endif; ?>

            <div class="mt-6">
                <div class="flex flex-col md:flex-row md:justify-between">
                    <p class="block font-medium text-gray-700 mb-2 md:mb-0">Contenido</p>
                    <?php if (isset($component)) { $__componentOriginal9d18508ee695ff66080277db62d517eb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9d18508ee695ff66080277db62d517eb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.select','data' => ['id' => 'select-variable','placeholder' => 'Agregar variable','name' => 'template_variable_id','options' => $options,'selected' => ''.e(old('template_variable_id')).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'select-variable','placeholder' => 'Agregar variable','name' => 'template_variable_id','options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($options),'selected' => ''.e(old('template_variable_id')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9d18508ee695ff66080277db62d517eb)): ?>
<?php $attributes = $__attributesOriginal9d18508ee695ff66080277db62d517eb; ?>
<?php unset($__attributesOriginal9d18508ee695ff66080277db62d517eb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9d18508ee695ff66080277db62d517eb)): ?>
<?php $component = $__componentOriginal9d18508ee695ff66080277db62d517eb; ?>
<?php unset($__componentOriginal9d18508ee695ff66080277db62d517eb); ?>
<?php endif; ?>
                </div>
                
                <?php if (isset($component)) { $__componentOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2 = $attributes; } ?>
<?php $component = App\View\Components\Controls\TiptapEditor::resolve(['name' => 'content','value' => old('content') ?? '','placeholder' => 'Escribe el contenido aquí...'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.tiptap-editor'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Controls\TiptapEditor::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2)): ?>
<?php $attributes = $__attributesOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2; ?>
<?php unset($__attributesOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2)): ?>
<?php $component = $__componentOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2; ?>
<?php unset($__componentOriginal9e8b6602b92cb4cb74c55fcf1bc58ae2); ?>
<?php endif; ?>
            </div>

            
            <div class="flex flex-col items-start mt-6">
                <input type="hidden" name="omit_rules" value="0">
                <?php if (isset($component)) { $__componentOriginalcad097174496e50484f4459921bbbfd4 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalcad097174496e50484f4459921bbbfd4 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.checkbox','data' => ['id' => 'omit_rules','name' => 'omit_rules','value' => '1','label' => 'Omitir reglas','xModel' => 'omitRules']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.checkbox'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['id' => 'omit_rules','name' => 'omit_rules','value' => '1','label' => 'Omitir reglas','x-model' => 'omitRules']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalcad097174496e50484f4459921bbbfd4)): ?>
<?php $attributes = $__attributesOriginalcad097174496e50484f4459921bbbfd4; ?>
<?php unset($__attributesOriginalcad097174496e50484f4459921bbbfd4); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalcad097174496e50484f4459921bbbfd4)): ?>
<?php $component = $__componentOriginalcad097174496e50484f4459921bbbfd4; ?>
<?php unset($__componentOriginalcad097174496e50484f4459921bbbfd4); ?>
<?php endif; ?>
            </div>

            
            <?php if(!empty($rules) && count($rules) > 0): ?>
                <div class="mt-6" id="rulesContainerContent" x-show="!omitRules" x-transition>
                    <h3 class="text-complement300 font-main text-lg font-medium mb-2">Reglas de la sección</h3>
                    <?php $__currentLoopData = $rules; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $rule): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php
                            $formattedOptions = collect($rule['options'])->pluck('key', 'value')->toArray();
                        ?>
                        <div class="mb-4">
                            <?php if (isset($component)) { $__componentOriginal9d18508ee695ff66080277db62d517eb = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9d18508ee695ff66080277db62d517eb = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.select','data' => ['name' => 'rules['.e($rule['id']).']','label' => ''.e($rule['label']).'','options' => $formattedOptions,'selected' => ''.e(old('rules.' . $rule['id'], $rule['default'] ?? null)).'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.select'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'rules['.e($rule['id']).']','label' => ''.e($rule['label']).'','options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($formattedOptions),'selected' => ''.e(old('rules.' . $rule['id'], $rule['default'] ?? null)).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9d18508ee695ff66080277db62d517eb)): ?>
<?php $attributes = $__attributesOriginal9d18508ee695ff66080277db62d517eb; ?>
<?php unset($__attributesOriginal9d18508ee695ff66080277db62d517eb); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9d18508ee695ff66080277db62d517eb)): ?>
<?php $component = $__componentOriginal9d18508ee695ff66080277db62d517eb; ?>
<?php unset($__componentOriginal9d18508ee695ff66080277db62d517eb); ?>
<?php endif; ?>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            <?php endif; ?>

            <div class="flex gap-4 mt-8">
                <?php if (isset($component)) { $__componentOriginal8565cc6e3559fc0755ba5bce504752a5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8565cc6e3559fc0755ba5bce504752a5 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.button','data' => ['type' => 'submit']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'submit']); ?>Guardar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8565cc6e3559fc0755ba5bce504752a5)): ?>
<?php $attributes = $__attributesOriginal8565cc6e3559fc0755ba5bce504752a5; ?>
<?php unset($__attributesOriginal8565cc6e3559fc0755ba5bce504752a5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8565cc6e3559fc0755ba5bce504752a5)): ?>
<?php $component = $__componentOriginal8565cc6e3559fc0755ba5bce504752a5; ?>
<?php unset($__componentOriginal8565cc6e3559fc0755ba5bce504752a5); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginal8565cc6e3559fc0755ba5bce504752a5 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8565cc6e3559fc0755ba5bce504752a5 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.controls.button','data' => ['href' => ''.e(route('contract-sections.index', $sectionTemplate->id)).'','variant' => 'secondary']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('controls.button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['href' => ''.e(route('contract-sections.index', $sectionTemplate->id)).'','variant' => 'secondary']); ?>
                    Cancelar
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8565cc6e3559fc0755ba5bce504752a5)): ?>
<?php $attributes = $__attributesOriginal8565cc6e3559fc0755ba5bce504752a5; ?>
<?php unset($__attributesOriginal8565cc6e3559fc0755ba5bce504752a5); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8565cc6e3559fc0755ba5bce504752a5)): ?>
<?php $component = $__componentOriginal8565cc6e3559fc0755ba5bce504752a5; ?>
<?php unset($__componentOriginal8565cc6e3559fc0755ba5bce504752a5); ?>
<?php endif; ?>
            </div>
        </form>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale9b1828e76ebe0c7e000efe9977b8aa6)): ?>
<?php $attributes = $__attributesOriginale9b1828e76ebe0c7e000efe9977b8aa6; ?>
<?php unset($__attributesOriginale9b1828e76ebe0c7e000efe9977b8aa6); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale9b1828e76ebe0c7e000efe9977b8aa6)): ?>
<?php $component = $__componentOriginale9b1828e76ebe0c7e000efe9977b8aa6; ?>
<?php unset($__componentOriginale9b1828e76ebe0c7e000efe9977b8aa6); ?>
<?php endif; ?><?php /**PATH /home/cnllsandbox/public_html/house-contract.cnll-sandbox.com/resources/views/contract-sections/create.blade.php ENDPATH**/ ?>