<?php $__env->startSection('title', $client ? "Modifier - {$client['name']}" : 'Ajouter un client'); ?>

<?php
    $breadcrumbs = [['label' => 'Clients', 'route' => 'admin.clients.index'], ['label' => $client ? $client['name'] : 'Ajouter']];
?>

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

    <form method="POST" action="<?php echo e($client ? route('admin.clients.update', $client) : route('admin.clients.store')); ?>" data-dirty-form novalidate>
        <?php echo csrf_field(); ?>
        <?php if($client): ?>
            <?php echo method_field('PATCH'); ?>
        <?php endif; ?>

        <div class="mb-5 flex flex-col gap-1">
            <h1 class="text-xl font-bold text-brand-ink"><?php echo e($client ? 'Modifier le client' : 'Ajouter un client'); ?></h1>
        </div>

        <div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
            <div class="admin-card flex flex-col gap-4 p-5 lg:col-span-2">
                <?php if (isset($component)) { $__componentOriginala36faa2d443b9f600fa80effd7afe361 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala36faa2d443b9f600fa80effd7afe361 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.field','data' => ['type' => 'text','name' => 'name','label' => 'Nom','required' => true,'value' => old('name', $client['name'] ?? ''),'placeholder' => 'Nom du client','error' => $errors->first('name')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'text','name' => 'name','label' => 'Nom','required' => true,'value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('name', $client['name'] ?? '')),'placeholder' => 'Nom du client','error' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('name'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $attributes = $__attributesOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__attributesOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $component = $__componentOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__componentOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginal78e2226de3aca9b0c13f2dda29d8d009 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal78e2226de3aca9b0c13f2dda29d8d009 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.media-picker','data' => ['name' => 'logo','label' => 'Logo','altName' => 'logo_alt','value' => old('logo', $client['media_id'] ?? null),'previewUrl' => $client['logo'] ?? null,'alt' => old('logo_alt', $client['logo_alt'] ?? ''),'help' => 'Le logo est affiche tel quel : couleurs et proportions conservees.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.media-picker'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['name' => 'logo','label' => 'Logo','alt-name' => 'logo_alt','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('logo', $client['media_id'] ?? null)),'preview-url' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($client['logo'] ?? null),'alt' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('logo_alt', $client['logo_alt'] ?? '')),'help' => 'Le logo est affiche tel quel : couleurs et proportions conservees.']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal78e2226de3aca9b0c13f2dda29d8d009)): ?>
<?php $attributes = $__attributesOriginal78e2226de3aca9b0c13f2dda29d8d009; ?>
<?php unset($__attributesOriginal78e2226de3aca9b0c13f2dda29d8d009); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal78e2226de3aca9b0c13f2dda29d8d009)): ?>
<?php $component = $__componentOriginal78e2226de3aca9b0c13f2dda29d8d009; ?>
<?php unset($__componentOriginal78e2226de3aca9b0c13f2dda29d8d009); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginala36faa2d443b9f600fa80effd7afe361 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala36faa2d443b9f600fa80effd7afe361 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.field','data' => ['type' => 'url','name' => 'website_url','label' => 'Site web','value' => old('website_url', $client['website_url'] ?? ''),'placeholder' => 'https://','error' => $errors->first('website_url')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'url','name' => 'website_url','label' => 'Site web','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('website_url', $client['website_url'] ?? '')),'placeholder' => 'https://','error' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->first('website_url'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $attributes = $__attributesOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__attributesOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $component = $__componentOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__componentOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
            </div>

            <div class="admin-card flex flex-col gap-4 p-5">
                <?php if (isset($component)) { $__componentOriginala36faa2d443b9f600fa80effd7afe361 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala36faa2d443b9f600fa80effd7afe361 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.field','data' => ['type' => 'number','name' => 'sort_order','label' => 'Ordre d\'affichage','value' => old('sort_order', $client['sort_order'] ?? 0)]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'number','name' => 'sort_order','label' => 'Ordre d\'affichage','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('sort_order', $client['sort_order'] ?? 0))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $attributes = $__attributesOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__attributesOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $component = $__componentOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__componentOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginala36faa2d443b9f600fa80effd7afe361 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala36faa2d443b9f600fa80effd7afe361 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.field','data' => ['type' => 'select','name' => 'status','label' => 'Statut','options' => ['published' => 'Publie', 'draft' => 'Brouillon', 'archived' => 'Archive'],'value' => old('status', $client['status'] ?? 'draft')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'select','name' => 'status','label' => 'Statut','options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(['published' => 'Publie', 'draft' => 'Brouillon', 'archived' => 'Archive']),'value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('status', $client['status'] ?? 'draft'))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $attributes = $__attributesOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__attributesOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $component = $__componentOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__componentOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
                <?php if (isset($component)) { $__componentOriginala36faa2d443b9f600fa80effd7afe361 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginala36faa2d443b9f600fa80effd7afe361 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.field','data' => ['type' => 'switch','name' => 'is_active','label' => 'Actif (visible publiquement)','checked' => old('is_active', $client['is_active'] ?? false)]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.field'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'switch','name' => 'is_active','label' => 'Actif (visible publiquement)','checked' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('is_active', $client['is_active'] ?? false))]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $attributes = $__attributesOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__attributesOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
<?php if (isset($__componentOriginala36faa2d443b9f600fa80effd7afe361)): ?>
<?php $component = $__componentOriginala36faa2d443b9f600fa80effd7afe361; ?>
<?php unset($__componentOriginala36faa2d443b9f600fa80effd7afe361); ?>
<?php endif; ?>
            </div>
        </div>

        <?php if (isset($component)) { $__componentOriginal5eee171cb0310d49fa57c946de0a0b10 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal5eee171cb0310d49fa57c946de0a0b10 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.action-bar','data' => ['previewHref' => route('home') . '#clients','status' => $client['status'] ?? 'draft']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.action-bar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['preview-href' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('home') . '#clients'),'status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($client['status'] ?? 'draft')]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal5eee171cb0310d49fa57c946de0a0b10)): ?>
<?php $attributes = $__attributesOriginal5eee171cb0310d49fa57c946de0a0b10; ?>
<?php unset($__attributesOriginal5eee171cb0310d49fa57c946de0a0b10); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal5eee171cb0310d49fa57c946de0a0b10)): ?>
<?php $component = $__componentOriginal5eee171cb0310d49fa57c946de0a0b10; ?>
<?php unset($__componentOriginal5eee171cb0310d49fa57c946de0a0b10); ?>
<?php endif; ?>
    </form>

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

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\nh-trans\resources\views/admin/clients/form.blade.php ENDPATH**/ ?>