<div>
    <div class="container-fluid">
        <div class="px-0 py-2 px-lg-5 py-lg-2">
            <!--********************************************************-->
            <!--**  PARA MOVIL                                        **-->
            <!--********************************************************-->
            <div class="d-block d-sm-none">
                <div class="py-2">
                    <h4 class="card-title text-muted pb-1">Registro&nbsp;<?php echo e($registros[0]->codigo); ?></h4>
                    <div>
                        <small>
                            <!--********************************************************-->
                            <!--**  LA COLUMNA IMPORTADO                              **-->
                            <!--********************************************************-->
                            <?php if($status == 'N'): ?>
                                <strong class="alert alert-danger  p-1" role="alert">
                                    Sin pagos registrado
                                </strong>
                            <?php elseif($status == 'P'): ?>
                                <strong class="alert alert-success  p-1 " role="alert">
                                    Pagado
                                </strong>
                            <?php elseif($status == 'D'): ?>
                                <strong class="alert alert-warning  p-1" role="alert">
                                    Pagos parciales
                                </strong>
                            <?php endif; ?>
                            &nbsp;
                            <!--********************************************************-->
                            <!--**  LA COLUMNA IMPORTADO                              **-->
                            <!--********************************************************-->
                            <?php if($activo == '1'): ?>
                                <strong class="alert alert-success p-1" role="alert">
                                    Activo
                                </strong>
                            <?php elseif($activo == '2'): ?>
                                <strong class="alert alert-secondary p-1" role="alert">
                                    Desactivado
                                </strong>
                            <?php endif; ?>
                        </small>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-body">
                    <div class="px-0 px-lg-3">
                        <!--********************************************************-->
                        <!--**  PARA PC                                           **-->
                        <!--********************************************************-->
                        <div class="d-none d-sm-block">
                            <div class="d-flex justify-content-between">
                                <div>
                                    <h4 class="card-title text-muted ">Registro&nbsp;<?php echo e($registros[0]->codigo); ?>

                                    </h4>
                                </div>
                                <div>
                                    <!--********************************************************-->
                                    <!--**  LA COLUMNA IMPORTADO                              **-->
                                    <!--**  SE COLOCA UNA CONDICIO                            **-->
                                    <!--**  CUANDO EL VALOR VIENE EN 0 SIGNIFICA NO IMPORTADO **-->
                                    <!--**  PERO SI VIENE EN 1 SIGNIFICA QUE SI ES IMPORTADO  **-->
                                    <!--********************************************************-->
                                    <?php if($status == 'N'): ?>
                                        <span class="alert alert-danger mx-1 p-2 h6" role="alert">
                                            Sin pagos registrado
                                        </span>
                                    <?php elseif($status == 'P'): ?>
                                        <span class="alert alert-success mx-1 p-2 h6" role="alert">
                                            Pagado
                                        </span>
                                    <?php elseif($status == 'D'): ?>
                                        <span class="alert alert-warning mx-1 p-2 h6" role="alert">
                                            Pagos parciales
                                        </span>
                                    <?php endif; ?>
                                    <!--********************************************************-->
                                    <!--**  LA COLUMNA IMPORTADO                              **-->
                                    <!--**  SE COLOCA UNA CONDICIO                            **-->
                                    <!--**  CUANDO EL VALOR VIENE EN 0 SIGNIFICA NO IMPORTADO **-->
                                    <!--**  PERO SI VIENE EN 1 SIGNIFICA QUE SI ES IMPORTADO  **-->
                                    <!--********************************************************-->
                                    <?php if($activo == '1'): ?>
                                        <span class="alert alert-success mx-1 p-2 h6" role="alert">
                                            Activo
                                        </span>
                                    <?php elseif($activo == '2'): ?>
                                        <span class="alert alert-secondary mx-1 p-2 h6" role="alert">
                                            Desactivado
                                        </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <h5 class="card-subtitle mb-2 text-muted">Datos del paciente</h5>
                        <div class="row">
                            <div class="col-12  col-lg-6">
                                <span class="text-muted">Nombre:</span>&nbsp;<span
                                    class="text-muted"><?php echo e($nombres); ?>&nbsp;<?php echo e($apellidos); ?></span>
                            </div>
                            <div class="col-12  col-lg-6">
                                <span class="text-muted">Numero de documento:</span>&nbsp;<span
                                    class="text-muted"><?php echo e($documento); ?></span>
                            </div>
                            <div class="col-12  col-lg-6">
                                <span class="text-muted">Genero:</span>&nbsp;<span class="text-muted">
                                    <?php if($genero == 'M'): ?>
                                        <span class="text-muted"><i class="fa-solid fa-mars"></i>&nbsp;Masculino</span>
                                    <?php elseif($genero == 'F'): ?>
                                        <span class="text-muted"><i class="fa-solid fa-venus"></i>&nbsp;Femenino</span>
                                    <?php endif; ?>
                                </span>
                            </div>
                            <div class="col-12  col-lg-6">
                                <span class="text-muted">Fecha de nacimiento:</span>&nbsp;
                                <span class="text-muted">
                                    <?= date_format(date_create($fecha_nacimiento), 'd/m/Y') ?>&nbsp;<span
                                        class="text-muted">Edad:</span>&nbsp;<?php echo e($edad); ?></span>
                            </div>
                        </div>
                        <div>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Datos de la intervencion</h5>

                            <div class="row">
                                <div class="col-12">
                                    <span class="text-muted">Intervencion:</span>&nbsp;<span
                                        class="text-muted"><?php echo e($intervencion); ?></span>
                                </div>
                                <div class="col-12 col-lg-6">
                                    <span class="text-muted">Cirujano:</span>&nbsp;<span
                                        class="text-muted"><?php echo e($cirujano); ?></span>
                                </div>
                                <div class="col-12 col-lg-6">
                                    <span class="text-muted">Anesteciologo:</span>&nbsp;<span
                                        class="text-muted"><?php echo e($anestesiologo); ?></span>
                                </div>
                                <div class="col-12 col-lg-6"> <span class="text-muted">Clinica:</span>&nbsp;<span
                                        class="text-muted"><?php echo e($clinica); ?></span></div>
                                <div class="col-12 col-lg-6">
                                    <span class="text-muted">Fecha de intervencion:</span>&nbsp;<span
                                        class="text-muted">&nbsp;<?= date_format(date_create($fecha_intervencion), 'd/m/Y') ?></span>
                                </div>
                            </div>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Factura</h5>
                            <div class="row">
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">NRO Factura:&nbsp;<?php echo e($nro_factura); ?></span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Fecha
                                        factura:&nbsp;<?= date_format(date_create($fecha_factura), 'd/m/Y') ?></span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Responsable:&nbsp;<?php echo e($responsable_pago); ?></span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Tasa:&nbsp;<?php echo e($tasa); ?> Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Fecha
                                        tasa:&nbsp;<?= date_format(date_create($fecha_tasa), 'd/m/Y') ?></span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Hora&nbsp;<?php echo e($hora_tasa); ?></span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Monto:&nbsp;<?php echo e($monto_factura); ?> Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Monto en dolares:&nbsp;$<?php echo e($monto_factura); ?></span>
                                </div>
                            </div>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Honorario de anesteciologo</h5>
                            <div class="row">
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Honorarios:&nbsp;<?php echo e($honorarios_anestesiologo); ?>

                                        Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">15%:&nbsp;<?php echo e($honorarios_anestesiologo_p); ?> Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Total:&nbsp;<?php echo e($honorarios_anestesiologo_total); ?>

                                        Bsf</span>
                                </div>
                            </div>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Honorario de preanestesiologo</h5>
                            <div class="row">
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Honorarios:&nbsp;<?php echo e($evaluacion_preanestesica); ?>

                                        Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">15%:&nbsp;<?php echo e($evaluacion_preanestesica_p); ?> Bsf</span>
                                </div>
                                <div class="col-12 col-lg-4">
                                    <span class="text-muted">Total:&nbsp;<?php echo e($evaluacion_preanestesica_total); ?>

                                        Bsf</span>
                                </div>
                            </div>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Pagos</h5>
                            <?php if($count_pagos == 0): ?>
                                <div class="w-100 p-4 alert-secondary text-secondary">
                                    <p>El registro no posee ningun pago asociado. para cargar un pago has <a
                                            class="text-link"
                                            href="<?php echo e(asset('registro/pagos/' . $id_vista_registro)); ?>">Clik aqui</a>
                                    </p>
                                </div>
                            <?php else: ?>
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th class="text-muted" scope="col">Tipo de pago</th>
                                            <th class="text-muted" scope="col">Fecha de pago</th>
                                            <th class="text-muted" scope="col">Monto</th>
                                            <th class="text-muted" scope="col">Tasa</th>
                                            <th class="text-muted" scope="col">Monto en $</th>
                                            <th class="text-muted" scope="col">Status</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $pagos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pago): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td class="text-muted"><?php echo e($pago->nombre); ?></td>
                                                <td class="text-muted">
                                                    <?= date_format(date_create($pago->fecha_reg), 'd/m/Y') ?></td>
                                                <td class="text-muted"><?php echo e($pago->monto); ?></td>
                                                <td class="text-muted"><?php echo e($pago->monto_tasa); ?></td>
                                                <td class="text-muted">
                                                    <?php echo e(round($pago->monto / $pago->monto_tasa, 2)); ?>

                                                </td>
                                                <?php if($pago->activo == '1'): ?>
                                                    <td class="text-success"><strong>Activo</strong></td>
                                                <?php elseif($pago->activo == '2'): ?>
                                                    <td class="text-secondary"><strong>Desactivado</strong></td>
                                                <?php endif; ?>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td colspan="2"></td>
                                            <th colspan="2" class="text-muted">
                                                Total:&nbsp;<?php echo e($registro_total_pagado); ?>&nbsp;Bsf</th>
                                            <th colspan="2" class="text-muted">
                                                Diferencia:&nbsp;<?php echo e($registro_diferencia); ?> Bsf</th>
                                        </tr>
                                    </tbody>
                                </table>
                            <?php endif; ?>
                            <hr>
                            <h5 class="card-subtitle mb-2 text-muted">Comentarios</h5>
                            <div class="text-muted">
                                <?php echo e($comentario); ?></th>
                            </div>
                            <div class="text-muted">
                                Registrado el dia:&nbsp;<?= date_format(date_create($fecha_reg), 'd/m/Y') ?></span>
                            </div>
                            <hr>
                            <div class="d-flex flex-row bd-highlight mb-3">
                                <div>
                                    <a href="<?php echo e(asset('registro/actualizar/' . $id_vista_registro)); ?>"
                                        class="text-decoration-none text-info"> <i
                                            class="fa-solid fa-pen-to-square"></i>Editar registro</a>
                                    <a href="<?php echo e(asset('registro/pagos/' . $id_vista_registro)); ?>"
                                        class="text-decoration-none text-info"><i class="fa-solid fa-money-bill"></i>
                                        Agregar pago</a>
                                </div>
                                <?php if($activo == '1'): ?>
                                    <button class="text-decoration-none text-info border-0 bg-white"
                                        data-bs-toggle="modal" data-bs-target="#modal_desactivar_registro"
                                        data-bs-placement='top' data-bs-toggle='tooltip' title="Activar registro"
                                        wire:click="seleccionar_registro('<?php echo e($id_vista_registro); ?>')">
                                        <i class="fas fa-ban"></i> Desactivar registro
                                    </button>
                                <?php elseif($activo == '2'): ?>
                                    <button class="text-decoration-none text-info border-0 bg-white"
                                        data-bs-toggle="modal" data-bs-target="#modal_activar_registro"
                                        data-bs-placement='top' data-bs-toggle='tooltip' title="Activar registro"
                                        wire:click="seleccionar_registro('<?php echo e($id_vista_registro); ?>')">
                                        <i class="fa-solid fa-check"></i> Activar registro
                                    </button>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--************-->
    <!--** MODALS **-->
    <!--************-->
    <div>
        <!--****************************-->
        <!--** MODAL ACTIVAR REGISTRO **-->
        <!--****************************-->
        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.modal.simple','data' => ['titulo' => 'Activar registro','identificador' => 'modal_activar_registro','msj' => 'Activando registro','accion' => 'activar_registro','preparar' => 'seleccionar_registro','msjpreparar' => 'Buscando registro','tipo' => 'md']]); ?>
<?php $component->withName('modal.simple'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['titulo' => 'Activar registro','identificador' => 'modal_activar_registro','msj' => 'Activando registro','accion' => 'activar_registro','preparar' => 'seleccionar_registro','msjpreparar' => 'Buscando registro','tipo' => 'md']); ?>
             <?php $__env->slot('body', null, []); ?> 
                <div wire:loading.remove>
                    <div align="center">
                        <h1> <i class="fa-solid fa-check text-success"></i></h1>
                        <div class="text-secondary"> Confirme si desea activar el registro numero: <strong
                                class="text-dark"><?php echo e($codigo); ?></strong> del
                            paciente: <strong
                                class="text-dark"><?php echo e($nombres); ?>&nbsp;<?php echo e($apellidos); ?></strong>, Numero de
                            documento: <strong class="text-dark"><?php echo e($documento); ?></strong>,datos de la
                            intervencion: <strong class="text-dark"><?php echo e($intervencion); ?></strong> Cirujano:
                            <strong class="text-dark"><?php echo e($cirujano); ?></strong>
                            del dia: <strong class="text-dark"><?php echo e($fecha_intervencion); ?></strong>.
                        </div>
                        <small class="text-secondary">Si esta seguro pulsar Activar, si no desea activar el
                            registro pulse cancelar.</small>
                    </div>
                </div>
             <?php $__env->endSlot(); ?>
             <?php $__env->slot('footer', null, []); ?> 
                <div wire:loading.remove>
                    <!--****************************************************-->
                    <!--** BOTONES DEL MODAL                              **-->
                    <!--****************************************************-->
                    <div class="d-flex justify-content-end mt-0 mb-2 p-0">
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.btn.cancelar','data' => ['accion' => 'resetear']]); ?>
<?php $component->withName('btn.cancelar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['accion' => 'resetear']); ?>Cancelar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                        &nbsp;
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.btn.guardar','data' => ['accion' => 'activar_registro']]); ?>
<?php $component->withName('btn.guardar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['accion' => 'activar_registro']); ?>Activar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                    </div>
                </div>
             <?php $__env->endSlot(); ?>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
        <!--********************************************-->
        <!--** MODAL DESACTIVAR REGISTRO               **-->
        <!--********************************************-->
        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.modal.simple','data' => ['titulo' => 'Desactivar registro','identificador' => 'modal_desactivar_registro','msj' => 'Desactivando registro','accion' => 'desactivar_registro','preparar' => 'seleccionar_registro','msjpreparar' => 'Buscando registro','tipo' => 'md']]); ?>
<?php $component->withName('modal.simple'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['titulo' => 'Desactivar registro','identificador' => 'modal_desactivar_registro','msj' => 'Desactivando registro','accion' => 'desactivar_registro','preparar' => 'seleccionar_registro','msjpreparar' => 'Buscando registro','tipo' => 'md']); ?>
             <?php $__env->slot('body', null, []); ?> 
                <div wire:loading.remove>
                    <div align="center">
                        <h1> <i class="fas fa-ban text-secondary"></i></h1>
                        <div class="text-secondary"> Confirme si desea desactivar el registro numero: <strong
                                class="text-dark"><?php echo e($codigo); ?></strong> del
                            paciente: <strong
                                class="text-dark"><?php echo e($nombres); ?>&nbsp;<?php echo e($apellidos); ?></strong>, Numero de
                            documento: <strong class="text-dark"><?php echo e($documento); ?></strong>,datos de la
                            intervencion: <strong class="text-dark"><?php echo e($intervencion); ?></strong> Cirujano:
                            <strong class="text-dark"><?php echo e($cirujano); ?></strong>
                            del dia: <strong class="text-dark"><?php echo e($fecha_intervencion); ?></strong>.
                        </div>
                        <small class="text-secondary">Si esta seguro pulsar desactivar, si no desea activar el
                            registro pulse cancelar.</small>
                    </div>
                </div>
             <?php $__env->endSlot(); ?>
             <?php $__env->slot('footer', null, []); ?> 
                <div wire:loading.remove>
                    <!--****************************************************-->
                    <!--** BOTONES DEL MODAL                              **-->
                    <!--****************************************************-->
                    <div class="d-flex justify-content-end mt-0 mb-2 p-0">
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.btn.cancelar','data' => ['accion' => 'resetear']]); ?>
<?php $component->withName('btn.cancelar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['accion' => 'resetear']); ?>Cancelar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                        &nbsp;
                        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.btn.guardar','data' => ['accion' => 'desactivar_registro']]); ?>
<?php $component->withName('btn.guardar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes(['accion' => 'desactivar_registro']); ?>Desactivar <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
                    </div>
                </div>
             <?php $__env->endSlot(); ?>
         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
    </div>
</div>
<?php /**PATH C:\laragon\www\SistemaMedicoV1\resources\views/livewire/registro/vista.blade.php ENDPATH**/ ?>