<div>
    <?php $__env->startComponent('common.breadcrumb', ['addBtn' => true, 'permission_create' => 'Contract_create', '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">Administración</li>
        <li class="breadcrumb-item active">Contratos</li>
    <?php if (isset($__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469)): ?>
<?php $component = $__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469; ?>
<?php unset($__componentOriginal96f5b8f7cb2e3bbc8f06cfd8ecfbc87428561469); ?>
<?php endif; ?>
<?php echo $__env->renderComponent(); ?>
    <?php echo $__env->make('common.searchbox', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <div class="container-fluid">
        <div class="card">
            <div class="card-body">
                <div class="tab-content" id="top-tabContent">

                    <div class="tab-pane fade show active" id="top-home" role="tabpanel" aria-labelledby="top-home-tab">
                        <div class="row">
                            <?php $__currentLoopData = $contracts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $contract): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-xxl-4 col-lg-6">
                                    <div class="project-box">
                                        <span class="badge" style="background-color:<?php echo e($contract->plan_color); ?>"><?php echo e($contract->plan_name); ?></span>
                                        <h6><?php echo e($contract->name); ?></h6>
                                        <div class="media align-items-center">
                                            <i class="fas fa-calendar-alt me-2 "></i>
                                            <div class="media-body">
                                                <p class="p-0 m-0"><?php echo e(\Carbon\Carbon::parse($contract->created_at)->day); ?> de <?php echo e(\Carbon\Carbon::parse($contract->created_at)->monthName); ?> del <?php echo e(\Carbon\Carbon::parse($contract->created_at)->year); ?></p>
                                            </div>
                                        </div>
                                        <p><?php echo e($contract->description); ?></p>
                                        <hr class="style-two">
                                        <div class="row mt-3">
                                            <div class="col-6">
                                                <a href="<?php echo e(route('contratos.edit', $contract->id)); ?>" class="btn btn-outline-primary btn-sm"><i class="fas fa-edit"></i></a>
                                            </div>
                                            <div class="col-6">
                                                <button class="btn-sm f-right btn btn-outline-<?php echo e($contract->status == 'Activo' ? 'danger' : 'success'); ?>" wire:click="ToggleStatusContract(<?php echo e($contract->id); ?>)" title="Desactivar"><i class="fas <?php echo e($contract->status == 'Activo' ? 'fa-eye-slash' : 'fa-eye'); ?>"></i></button>
                                            </div>
                                        </div>
                                        <hr class="style-two">
                                        <div class="project-status mt-4">
                                            <div class="row">
                                                <div class="col-6">
                                                    <?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <?php if($plan->contract_id == $contract->id): ?>
                                                            <span class="small d-inline-block px-1 my-1" style="border: 2px solid <?php echo e($plan->plan_color); ?>"><?php echo e($plan->plan_name); ?></span>
                                                        <?php endif; ?>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </div>
                                                <div class="col-6">
                                                    <div class="media mb-0">
                                                        <div class="media-body text-end <?php echo e($contract->status == 'Activo' ? 'text-success' : 'text-danger'); ?>"><span><?php echo e($contract->status); ?></span></div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div><!--end row-->
                        <?php echo e($contracts->links()); ?>

                    </div><!-- /.card-body -->
                </div>
            </div>
        </div>
    </div>
    <?php echo $__env->make('livewire.contracts.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 /**PATH /var/www/html/resources/views/livewire/contracts/component.blade.php ENDPATH**/ ?>