<div>
    <?php $__env->startComponent('common.breadcrumb', ['addBtn' => false, 'permission_create' => 'Company_register_users_index', 'breadcrumb_show' => $breadcrumb_show]); ?>
        <?php $__env->slot('breadcrumb_title'); ?>
            <h3><?php echo e($componentName); ?> | <?php echo e($pageTitle); ?></h3>
        <?php $__env->endSlot(); ?>
        <li class="breadcrumb-item">Empresa</li>
        <li class="breadcrumb-item active">Contratos</li>

    <?php if (isset($__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469)): ?>
<?php $component = $__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469; ?>
<?php unset($__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
    <div class="container-fluid">
        <div class="row layout-top-spacing">
            <div class="col-sm-12">
                <div class="card">
                    <div class="card-body">
                        <div class="card-header">
                            <h4>Empleado: <b><?php echo e($first_name); ?> <?php echo e($last_name); ?></b></h4>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row justify-content-center">
            <div class="col-lg-4 col-md-4 col-sm-12">
                <div class="form-group">
                    <select class="form-select" wire:model="type_contract">
                        <option value="">Todos los tipos de Contratos</option>
                        <?php $__currentLoopData = DataTypeContract(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($key); ?>"><?php echo e($value); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
            </div>
            <div class="col-lg-4 col-md-4 col-sm-12">
                <div class="form-group">
                    <select class="form-select" wire:model="sub_type_contract">
                        <option value="">Todos los Subtipos de Contratos</option>
                        <?php $__currentLoopData = DataSubTypeContract(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <option value="<?php echo e($key); ?>"><?php echo e($value); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
            </div>
        </div><!-- row -->

        <div class="row justify-content-between file-content mb-2">
            <div class="col-lg-4 col-md-4 col-sm-12">
                <div class="form-inline">
                    <div class="form-group d-flex mb-0"><i class="fa fa-search"></i>
                    <input class="form-control-plaintext" type="text" wire:model="search" placeholder="Buscar...">
                    </div>
                </div>
            </div>
            <?php if(isset($count_reg)): ?>
                <div class="col-lg-4 col-md-4 col-sm-12">
                    <p class="p-l-20">Total Contratos: <?php echo e($count_reg); ?></p>
                </div>
            <?php endif; ?>

        </div>
    </div>
    <div class="container-fluid">
        <div class="row layout-top-spacing">
            <div class="col-sm-12">
                <?php if($count_reg > 0): ?>
                <?php $__currentLoopData = $contracts_company; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="card">
                    <div class="card-body">
                        <div class="card-title">
                            <h6 class="d-inline">Nombre del Contrato: </h6>
                            <p class="d-inline float-right"><?php echo e($item->name); ?></p>
                        </div>
                        <div class="card-subtitle mb-2 text-muted">
                            <h6 class="d-inline">Tipo de Contrato: </h6>
                            <p class="d-inline float-right"><?php echo e(DataTypeContract($item->type)); ?></p>
                            <h6 class="d-inline"> - | - </h6>
                            <h6 class="d-inline">Subtipo de Contrato: </h6>
                            <p class="d-inline float-right"><?php echo e(DataSubTypeContract($item->sub_type)); ?></p>
                        </div>
                        <div class="card-content">
                            <h6 class="d-inline">Descripción: </h6>
                            <p class="d-inline float-right"><?php echo e($item->description); ?></p>
                            <hr class="my-2">
                            <hr class="my-2">
                            <div class="row">
                                <div class="col-lg-4 col-md-4 col-sm-12">
                                    <div class="form-group">
                                        <a href="javascript:void(0);" class="btn btn-outline-success btn-block" wire:click="openSelContract(<?php echo e($item->id); ?>)">Seleccionar Contrato</a>
                                    </div>
                                </div>
                            </div><!-- row -->
                        </div><!-- card-content -->
                    </div><!-- card-body -->
                </div><!-- card -->
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php else: ?>
                <div class="card">
                    <div class="card-header text-center">
                        <h5 class="text-danger">No hay Contratos Activos para esta Empresa</h5>
                    </div>
                </div>
                <?php endif; ?>
                <?php echo e($contracts_company->links()); ?>

            </div><!-- col-sm-12 -->
        </div><!-- row -->
    </div><!-- container-fluid -->
    <?php echo $__env->make('livewire.company.contracts.create.form', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
</div>
<?php echo $__env->make('common.scriptsCompStandar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php $__env->startPush('cheditor'); ?>
<script src="<?php echo e(asset('assets/js/ckeditor/ckeditor.js')); ?>"></script>
<script>
    const config = {
        language: 'es',
        height: 150,
        removeButtons: 'Cut,Copy,Paste,PasteText,PasteFromWord,Link,Table,Anchor,Underline,Strike,Subscript,Superscript,Image,SpecialChar,Maximize,ShowBlocks,About,Save,NewPage,Preview,Print,Templates,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Strike,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Unlink,Anchor,Flash,HorizontalRule,Smiley,SpecialChar,PageBreak,Iframe,Styles,Format,Font,FontSize,TextColor,BGColor,Maximize,About,ShowBlocks,Save,NewPage,Preview,Print,Templates,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,Strike,Blockquote,CreateDiv,BidiLtr,BidiRtl,Language,Unlink,Anchor,Flash,HorizontalRule,Smiley,Source'
    };
    const editor1 = CKEDITOR.replace('no_salary_cost', config);


    document.addEventListener('DOMContentLoaded', function() {
        window.livewire.on('show-modal', () => {
            editor1.setData('<ul><li></li></ul>');
        });

    });

    document.querySelector('#create_contract').addEventListener( 'click', () => {
        let no_salary_cost = $('#no_salary_cost').data('no_salary_cost');
        eval (no_salary_cost).set('no_salary_cost', editor1.getData());
    } );
</script>
<?php $__env->stopPush(); ?>
<?php /**PATH /var/www/html/resources/views/livewire/company/contracts/create/component.blade.php ENDPATH**/ ?>