<?php $__env->startSection('content'); ?>

    <div class="sixteen wide tablet sixteen wide computer column ">
        <div class="ui segment">
            
            <h4 class="ui dividing header teal centered">REGISTRO DE CLIENTES</h4>
            
            <div class="ui equal width grid">
                <div class="row">
                     <div class="column">
                        <form id="frmBuscar" autocomplete="off" method="GET" action="<?php echo e(url('cliente/buscar')); ?>" >
                            <div class="ui action small input" >
                                  <input type="text" placeholder="Buscar..." name="search">
                                  <button type="submit" class="ui icon button " title="Clic para buscar"><i class="search icon"></i></button>
                            </div>
                        </form>
                    </div>
                    <div class="column export_files" style="text-align: right">
                        <div class="ui icon buttons" >
                            <button class="ui grey basic button" title="Clic para descargar en Excel"><i class="green large file excel outline icon"></i></button>
                            <button class="ui grey basic button" title="Clic para descargar en PDF"><i class="red large file pdf outline icon"></i></button>
                        </div>
                    </div>
                   
                </div>
            </div>

            <table class="ui celled striped table">
                <thead>
                    <tr>
                        <th class="head_table">N°</th>
                        <th class="head_table">Nombre / Razon Social</th>
                        <th class="head_table">Documento</th>
                        <th class="head_table">Direccion</th>
                        <th class="head_table">Acciones</th>
                    </tr>
                </thead>
                <tbody>
                   <?php /**/ $i = $data->firstItem() /**/ ?>
                    <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cliente): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr data-table="<?php echo e($cliente->id_cliente); ?>">
                        <td><?php echo e($i); ?></td>
                        <td><?php echo e($cliente->nombre); ?></td>
                        <td><?php echo e($cliente->tipo_documento ? $cliente->tipo_documento->nombre ." : ". $cliente->numero_documento : ''); ?></td>
                        <td><?php echo e($cliente->direccion); ?></td>
                        <td>        
                            <div class="ui mini vertical animated positive button button_info_modal" title="Ver informacion detallada" data-id="<?php echo e($cliente->id_cliente); ?>">
                                <div class="hidden content">Info</div>
                                <div class="visible content"><i class="search icon"></i></div>
                            </div>                    
                            <a class="ui mini vertical animated blue button" title="Editar datos" href="<?php echo e(url('cliente/editar/'.$cliente->id_cliente)); ?>">
                                <div class="hidden content">Editar</div>
                                <div class="visible content"><i class="pencil alternate  icon"></i></div>
                            </a>
                            <div class="ui mini vertical animated red button button_delete_modal" title="Eliminar registro" data-id="<?php echo e($cliente->id_cliente); ?>">
                                <div class="hidden content">Eliminar</div>
                                <div class="visible content"><i class="trash alternate icon"></i></div>
                            </div>
                        </td>
                    </tr>
                    <?php /**/ $i++ /**/ ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
                <tfoot>
                    <tr>
                        <th colspan="5">
                            <?php echo $__env->make('layout.includes.pagination', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </th>
                    </tr>
                </tfoot>
                
            </table>

        </div>
    </div>

    <!--start delete modal -->
    <div class="ui small basic modal" id="delete_modal">
        <div class="ui icon header"><i class="trash alternate icon"></i>Eliminar Registro</div>
        <div class="content" style="text-align: center; font-size: 16px">
          <p>¿Está seguro que quiere eliminar este registro del sistema?</p>
        </div>
        <div class="actions">
            <div class="ui red basic cancel inverted button" title="Haga clic para salir"><i class="remove icon"></i>Cancelar</div>
            <div class="ui green ok inverted button" title="Haga clic para eliminar"> <i class="checkmark icon"></i>Eliminar</div>
        </div>
    </div>
    <!--end delete modal -->

    <!--start details modal -->
    <div class="ui standard small modal" id="detalles_modal">
        <div class="header">Información del Proveedor</div>
        <div class="content">
            <div class="description">
                <div class="ui equal width grid">
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Nombre / Razon Social : </b></div>
                        <div class="ten wide column"><span id="_1"></span></div>
                    </div>
                   <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Tipo de Documento : </b></div>
                        <div class="ten wide column"><span id="_2"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Nro Documento : </b></div>
                        <div class="ten wide column"><span id="_3"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Direccion : </b></div>
                        <div class="ten wide column"><span id="_4"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Telefono : </b></div>
                        <div class="ten wide column"><span id="_5"></span></div>
                    </div>
                    <div class="row" style="padding-bottom: 0 !important">
                        <div class="six wide column " style="text-align: right"><b>Email : </b></div>
                        <div class="ten wide column"><span id="_6"></span></div>
                    </div>
                </div>
            </div>
        </div>   
        <div class="actions">
            <div class="ui primary right labeled icon deny button">Cerrar<i class="times icon"></i></div>
        </div>
    </div>
    <!--end details modal -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(asset('js/cliente/listar.js')); ?>"></script>
<?php $__env->stopSection(); ?>



<?php echo $__env->make('layout.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>