<div wire:ignore.self
class="modal fade bs-example-modal-lg"
id="ModalCustomer"
tabindex="-1"
role="dialog"
data-backdrop="static"
aria-labelledby="Modal_customer"
aria-hidden="true"
>
<div class="modal-dialog modal-lg modal-dialog-top">
    <div class="modal-content">
        <div class="modal-header">
            <h6 class="modal-title" id="Modal_customer">
                <!-- __BLOCK__ --><?php if($isNewCustomer): ?> Ajouter <?php else: ?> Mise à jour <?php endif; ?> <!-- __ENDBLOCK__ --> Customer
            </h6>
            <button
                type="button"
                class="close"
                wire:click.prevent="CloseModalCustomer"
                data-dismiss="modal"
                aria-hidden="true"
            >
                ×
            </button>
        </div>
        <div class="modal-body">

            <div wire:ignore.self class="tab" >
                <ul class="nav nav-pills" role="tablist">
                    <li class="nav-item">
                        <a 
                            wire:click.prevent="selectTab_t('society')"
                            class="nav-link  text-blue <?php echo e($tab_t == 'society' ? 'active' : ''); ?>"
                            data-toggle="tab"
                            href="#society"
                            role="tab"
                            aria-selected="true"
                            >Info Entreprise</a
                        >
                    </li>
                    <li class="nav-item">
                        <a  
                            wire:click.prevent="selectTab_t('user')"
                            class="nav-link text-blue <?php echo e($tab_t == 'user' ? 'active' : ''); ?>"
                            data-toggle="tab"
                            href="#user_t"
                            role="tab"
                            aria-selected="false"
                            >Personne à contacter</a
                        >
                    </li>
                    
                </ul>
                <div class="tab-content">
                    <div
                        class="tab-pane fade <?php echo e($tab_t == 'society' ? 'show active' : ''); ?>"
                        id="society"
                        role="tabpanel"
                    >
                        <div class="pd-20">
                            <div class="row">
                                <div class="col-md-12">
                                    <form >
                                        <div class="row mb-2">
                                         
                                            <div class="col-md-4">
                                                    <label for="">Raison Sociale <span style="color:red;">*</span></label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Raison sociale" wire:model="raison_sociale" maxlength="50" <?php if(!$isNewCustomer): ?> readonly  <?php endif; ?> >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['raison_sociale'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                               
                                            </div>
                                            <div class="col-md-4">
                                                    <label for="">Forme Sociale <span style="color:red;">*</span></label>
                                                    <select class="form-control form-control-sm" wire:model="forme_sociale" <?php if(!$isNewCustomer): ?> readonly  <?php endif; ?>>
                                                        <option value="">-- Select --</option>
                                                        <!-- __BLOCK__ --><?php $__currentLoopData = get_select_formeSociale(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($data->id); ?>"><?php echo e($data->name); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <!-- __ENDBLOCK__ -->
                                                    </select>
                                                     <!-- __BLOCK__ --><?php $__errorArgs = ['forme_sociale'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                            <div class="col-md-4">
                                                <label for="">Activité Principale </label>
                                                <input type="text"  class="form-control form-control-sm" placeholder="Activité Principale" wire:model="activite_principale" maxlength="150">
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['activite_principale'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            </div>
                                        </div>
                                        <div class="row mb-2">
                                            <div class="col-md-4">
                                                    <label for="">Sigle</label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Sigle" wire:model="sigle" maxlength="50">
                                                
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['sigle'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                          
                                            <div class="col-md-4 ">
                                                    <label for="">Téléphone </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Téléphone (Optionnel)" wire:model="phone_"   maxlength="15">
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['phone_'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                
                                            <div class="col-md-4">
                                                <label for="">Email </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Email (Optionnel)" wire:model="email_"  maxlength="50"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['email_'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                        </div>
                                        <div class="row mb-2">
                                            <div class="col-md-4">
                                                     <label for="">Adresse </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Adresse (Optionnel)" wire:model="adresse_" maxlength="120"   >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['adresse_'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                          
                                            <div class="col-md-4">
                                                    <label for="">Ville </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Ville (Optionnel)" wire:model="ville_" maxlength="50"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['ville_'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                
                                            <div class="col-md-4">
                                                    <label for="">Pays </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Pays (Optionnel)" wire:model="pays_" maxlength="50"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['pays_'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                        </div>
                                        
                                        <div class="row mb-2">
                                            <div class="col-md-4">
                                                     <label for="">Identification Fiscale</label> <small>(Id. Nat)</small>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Id. Nat (Optionnel)" wire:model="id_nat" maxlength="120"   >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['id_nat'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                          
                                            <div class="col-md-4">
                                                    <label for="">N° R.C.C.M </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="RCCM (Optionnel)" wire:model="rccm" maxlength="50"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['rccm'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                
                                            <div class="col-md-4">
                                                    <label for="">N° Impôt </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="N° Impôt (Optionnel)" wire:model="num_impot" maxlength="50"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['num_impot'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div> 
                        </div>
                    </div>
                    <div class="tab-pane fade <?php echo e($tab_t == 'user' ? 'show active' : ''); ?>" 
                        id="user_t" role="tabpanel">
                        <div class="pd-20">
                            <div class="row">
                                <div class="col-md-12">
                                    <form >
                                        <div class="row mb-2">
                                         
                                            <div class="col-md-4">
                                                    <label for="">Pseudo <span style="color:red;">*</span></label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Pseudo" wire:model="pseudo" maxlength="15"  <?php if(!$isNewCustomer): ?> readonly  <?php endif; ?>>
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['pseudo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                               
                                            </div>
                                            <div class="col-md-4">
                                                    <label for="">Email <span style="color:red;">*</span></label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Email" wire:model="email" maxlength="80" >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                            <div class="col-md-4">
                                              
                                                <label for="">Téléphone </label>
                                                <input type="text"  class="form-control form-control-sm" placeholder="Téléphone (Optionnel)" wire:model="phone" maxlength="15">
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            </div>
                                        </div>
                                        
                                        <div class="row mb-2">
                                         
                                            <div class="col-md-4">
                                                    <label for="">Nom <span style="color:red;">*</span></label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Nom" wire:model="lastname" maxlength="20"  >
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['lastname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                               
                                            </div>
                                            <div class="col-md-4">
                                                    <label for="">Postnom </label>
                                                    <input type="text"  class="form-control form-control-sm" placeholder="Postnom" wire:model="postname" maxlength="20">
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['postname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                        <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                                
                                            </div>
                                            <div class="col-md-4">
                                              
                                                <label for="">Prénom <span style="color:red;">*</span></label>
                                                <input type="text"  class="form-control form-control-sm" placeholder="Prénom" wire:model="firstname" maxlength="20">
                                                    <!-- __BLOCK__ --><?php $__errorArgs = ['firstname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                                            <small class="form-text text-danger"><?php echo e($message); ?></small>
                                                    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> <!-- __ENDBLOCK__ -->
                                            </div>
                                        </div>
                                        
                                        <!-- __BLOCK__ --><?php if(!$isNewCustomer): ?>
                                        <div class="row mb-2">
                                            <div class="col-md-4 pt-4">
                                                <button type="button" class="btn btn-outline-primary btn-sm" wire:click="addItem">Regénérer un mot de passe</button>    
                                            </div>
                                        </div>
                                        <?php endif; ?> <!-- __ENDBLOCK__ -->
                                        
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                   
                </div>
            </div>

        </div>
        <div class="modal-footer">
            <button
                type="button"
                wire:click.prevent="CloseModalCustomer"
                class="btn btn-secondary btn-sm"
                data-dismiss="modal"
               
            >
                Fermer
            </button>

       

            <!-- __BLOCK__ --><?php if($tab_t === 'user'): ?>
                <button type="button" class="btn <?php if($isNewCustomer): ?> btn-primary <?php else: ?> btn-success <?php endif; ?> btn-sm" wire:click="saveCustomer"
                wire:loading.attr="disabled" style="width:15%;"
                >
                    <div class="spinner-border spinner-border-sm"  role="status" wire:loading wire:target="saveCustomer">
                        <span class="visually-hidden"></span>
                    </div>

                    <div wire:loading.remove wire:target="saveCustomer">
                        Enregistrer
                    </div>
                </button>

            <?php else: ?>
                <button type="button" wire:click="selectTab_t('user')"  class="btn btn-primary btn-sm" style="width:15%;">
                    Suivant
                </button>
            <?php endif; ?> <!-- __ENDBLOCK__ -->
        </div>
    </div>
</div>
</div>

<?php $__env->startPush('scripts'); ?>

<script>
    	window.addEventListener('hideModalCustomer', event => {
					$('#ModalCustomer').modal('hide');
				})

        window.addEventListener('showModalCustomer', event => {
					$('#ModalCustomer').modal('show');
				})
  
</script>
    
<?php $__env->stopPush(); ?>

<?php /**PATH D:\laravel_apps\big-manager\resources\views/livewire/admin/modal-customer.blade.php ENDPATH**/ ?>