
<div class="row">
    <div class="col-lg-12 m-b-2 m-t-2 ">
        <template x-if="!$store.cart.customer">
            <div class="form-group" @click.away="active=false;">
                <small class="float-right">
                    <strong class="fs-10 text-blue">
                        <strong x-text="'Found : '+ formatNumber(filteredCustomers.length)+' / '"></strong>
                        <strong x-text="'Total : '+formatNumber(customers.length)">/</strong>
                    </strong>
                </small>
                <input type="text"
                       x-model.debounce.300ms="search"
                       @input.debounce.300ms="filteredCustomers"
                       @focus="active=true"
                       
                       
                       placeholder="<?php echo e(__("Name, Phone Number or Email")); ?>"
                       class="form-control form-control-sm m-b-0" />


                <template x-if="active && filteredCustomers">
                    <div class="m-t-0"
                         style="position: relative; width:100%; z-index:1;"
                         x-cloak
                         x-transition>
                        <div class="mt-1 border bg-white rounded"
                             style="position: absolute; width:100% ; max-height: 300px; overflow-y:scroll">
                            <ul class="list-group">
                                <template x-for="(cust, index) in filteredCustomers" :key="index">
                                    <a href="javascript:void(0)" x-data="customer_show(cust)"
                                       @click="selectCustomer(customer);"
                                       style="text-decoration: none;"
                                    >
                                        <li class="list-group-item list-group-item-action cursor-pointer m-b-0 p-5s">
                                            <div class="media">













                                                <div class="media-body">
                                                    <strong class="fs-11 list-group-item-heading text-uppercase m-b-0" x-text="customer.full_name"></strong>
                                                    <div class="fs-11">
                                                        <i class="fa fa-envelope"></i>
                                                        <span x-text="customer?.email ?? '---'"></span>
                                                    </div>
                                                    <div class="fs-11">
                                                        <i class="fa fa-phone"></i>
                                                        <span x-text="customer?.phone ?? '---'"></span>
                                                    </div>
                                                    <template x-if="customer.balance>0">
                                                        <div class="fs-11 text-indigo">
                                                            <i class="fa fa-money"></i>
                                                            <strong x-text="formatNumber(customer.balance,currency)"></strong>
                                                        </div>
                                                    </template>
                                                </div>
                                            </div>
                                        </li>
                                    </a>
                                </template>
                            </ul>
                        </div>
                    </div>
                </template>

                <template x-if="filteredCustomers.length <=0 && search !== ''">
                    <ul class="list-group">
                        <li class="list-group-item list-group-item-action cursor-pointer text-center"
                            style="border: 1px solid var(--red)"
                            @click="addCustomer">
                            <?php if (isset($component)) { $__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e = $component; } ?>
<?php $component = App\View\Components\NotFound::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('not-found'); ?>
<?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\NotFound::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['desc' => '<div class=\'m-b-0 fs-11\'>'.e(__('Click to add new customer')).'</div><div> <i class=\'fs-15 fa fa-user-plus\'></i></div>']); ?>
                                <s-slot name="title"><?php echo e(__("Customer Not Found.")); ?></s-slot>
                             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e)): ?>
<?php $component = $__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e; ?>
<?php unset($__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e); ?>
<?php endif; ?>

                        </li>
                    </ul>
                </template>

            </div>
        </template>
    </div>
    <div class="col-lg-12">
        <template x-if="!$store.cart.customer && !active && search === ''">
            <?php if (isset($component)) { $__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e = $component; } ?>
<?php $component = App\View\Components\NotFound::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('not-found'); ?>
<?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\NotFound::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
                 <?php $__env->slot('title', null, []); ?> <?php echo e(__("No Customer Selected")); ?> <?php $__env->endSlot(); ?>
                 <?php $__env->slot('desc', null, []); ?> <?php echo e(__('To select customer, search it by typing name,phone or email in input search.')); ?> <?php $__env->endSlot(); ?>
             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e)): ?>
<?php $component = $__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e; ?>
<?php unset($__componentOriginal13e1f50f0bc62a8194c32460ab51a9dc01c30e0e); ?>
<?php endif; ?>
        </template>
    </div>

    <template x-if="!active && filled($store.cart.customer)">
        <div class="col-lg-12" x-transition>
            <div class="fs-11 order-head-info"><?php echo e(__("Full Name ")); ?> : <strong x-text="$store.cart.customer.full_name ?? '---'"></strong></div>
            <div class="fs-11 order-head-info"><?php echo e(__('Email')); ?> : <strong x-text="$store.cart.customer.email ?? '---'"></strong></div>
            <div class="fs-11 order-head-info"><?php echo e(__('Phone')); ?> : <strong x-text="$store.cart.customer.phone ?? '---'"></strong></div>
            <template x-if="$store.cart.customer.balance >0">
                <div class="fs-11 order-head-info text-indigo"><?php echo e(__('Balance')); ?> : <strong x-text="formatNumber($store.cart.customer.balance,currency)"></strong></div>
            </template>
            
        </div>
    </template>
</div>
<?php /**PATH /home2/lekruu/public_html/resources/views/backend/orders/create/blocs/customer1.blade.php ENDPATH**/ ?>