<?php ($item = $brand ?? null); ?>
<div class="grid gap-6 md:grid-cols-2">
    <?php if (isset($component)) { $__componentOriginal530746098e8865a2469fd5685420112b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal530746098e8865a2469fd5685420112b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.text-input','data' => ['name' => 'name','label' => 'Brand Name','value' => $item?->name,'required' => true,'placeholder' => 'Monica Beds']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.text-input'); ?>
<?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' => 'name','label' => 'Brand Name','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item?->name),'required' => true,'placeholder' => 'Monica Beds']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal530746098e8865a2469fd5685420112b)): ?>
<?php $attributes = $__attributesOriginal530746098e8865a2469fd5685420112b; ?>
<?php unset($__attributesOriginal530746098e8865a2469fd5685420112b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal530746098e8865a2469fd5685420112b)): ?>
<?php $component = $__componentOriginal530746098e8865a2469fd5685420112b; ?>
<?php unset($__componentOriginal530746098e8865a2469fd5685420112b); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal530746098e8865a2469fd5685420112b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal530746098e8865a2469fd5685420112b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.text-input','data' => ['name' => 'slug','label' => 'Slug (Optional)','value' => $item?->slug,'placeholder' => 'monica-beds','helpText' => 'Auto-generated from name if left empty.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.text-input'); ?>
<?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' => 'slug','label' => 'Slug (Optional)','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item?->slug),'placeholder' => 'monica-beds','help-text' => 'Auto-generated from name if left empty.']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal530746098e8865a2469fd5685420112b)): ?>
<?php $attributes = $__attributesOriginal530746098e8865a2469fd5685420112b; ?>
<?php unset($__attributesOriginal530746098e8865a2469fd5685420112b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal530746098e8865a2469fd5685420112b)): ?>
<?php $component = $__componentOriginal530746098e8865a2469fd5685420112b; ?>
<?php unset($__componentOriginal530746098e8865a2469fd5685420112b); ?>
<?php endif; ?>

    <div>
        <?php if (isset($component)) { $__componentOriginal6384af2cfbb3fb249311eef9f601626b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal6384af2cfbb3fb249311eef9f601626b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.file-upload','data' => ['name' => 'logo_upload','label' => 'Logo Image','accept' => 'image/*','helpText' => 'Max size: 5MB. Formats: JPEG, PNG, JPG, GIF, WEBP']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.file-upload'); ?>
<?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_upload','label' => 'Logo Image','accept' => 'image/*','help-text' => 'Max size: 5MB. Formats: JPEG, PNG, JPG, GIF, WEBP']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal6384af2cfbb3fb249311eef9f601626b)): ?>
<?php $attributes = $__attributesOriginal6384af2cfbb3fb249311eef9f601626b; ?>
<?php unset($__attributesOriginal6384af2cfbb3fb249311eef9f601626b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6384af2cfbb3fb249311eef9f601626b)): ?>
<?php $component = $__componentOriginal6384af2cfbb3fb249311eef9f601626b; ?>
<?php unset($__componentOriginal6384af2cfbb3fb249311eef9f601626b); ?>
<?php endif; ?>
        <?php if($item?->logo): ?>
            <div class="mt-2 flex items-center gap-2">
                <span class="text-xs text-gray-500 dark:text-gray-400">Current:</span>
                <img src="<?php echo e($item->logo); ?>" alt=""
                    class="h-10 w-10 rounded-lg object-contain border border-gray-200 dark:border-gray-800 bg-gray-50 dark:bg-gray-900">
            </div>
        <?php endif; ?>
    </div>

    <?php if (isset($component)) { $__componentOriginale7b240ac873e22945c281c841a0f88ab = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale7b240ac873e22945c281c841a0f88ab = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.number-input','data' => ['name' => 'sort_order','label' => 'Display order','value' => $item?->sort_order ?? 0,'min' => '0']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.number-input'); ?>
<?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' => 'sort_order','label' => 'Display order','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item?->sort_order ?? 0),'min' => '0']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale7b240ac873e22945c281c841a0f88ab)): ?>
<?php $attributes = $__attributesOriginale7b240ac873e22945c281c841a0f88ab; ?>
<?php unset($__attributesOriginale7b240ac873e22945c281c841a0f88ab); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale7b240ac873e22945c281c841a0f88ab)): ?>
<?php $component = $__componentOriginale7b240ac873e22945c281c841a0f88ab; ?>
<?php unset($__componentOriginale7b240ac873e22945c281c841a0f88ab); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginal694712473b787cd740db4e46be9da3f9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal694712473b787cd740db4e46be9da3f9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.textarea','data' => ['name' => 'description','label' => 'Description','value' => $item?->description,'rows' => '3','class' => 'md:col-span-2','placeholder' => 'Brief details about the brand...']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.textarea'); ?>
<?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' => 'description','label' => 'Description','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item?->description),'rows' => '3','class' => 'md:col-span-2','placeholder' => 'Brief details about the brand...']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal694712473b787cd740db4e46be9da3f9)): ?>
<?php $attributes = $__attributesOriginal694712473b787cd740db4e46be9da3f9; ?>
<?php unset($__attributesOriginal694712473b787cd740db4e46be9da3f9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal694712473b787cd740db4e46be9da3f9)): ?>
<?php $component = $__componentOriginal694712473b787cd740db4e46be9da3f9; ?>
<?php unset($__componentOriginal694712473b787cd740db4e46be9da3f9); ?>
<?php endif; ?>

    <div class="md:col-span-2 flex flex-col gap-4 sm:flex-row">
        <div class="flex-1">
            <?php if (isset($component)) { $__componentOriginalfe26a99f60f8bc4594bf63469705f3a7 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.toggle-switch','data' => ['name' => 'is_featured','label' => 'Featured','checked' => $item ? $item->is_featured : false,'helpText' => 'Display prominently on the homepage / shop.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.toggle-switch'); ?>
<?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' => 'is_featured','label' => 'Featured','checked' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item ? $item->is_featured : false),'help-text' => 'Display prominently on the homepage / shop.']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7)): ?>
<?php $attributes = $__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7; ?>
<?php unset($__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalfe26a99f60f8bc4594bf63469705f3a7)): ?>
<?php $component = $__componentOriginalfe26a99f60f8bc4594bf63469705f3a7; ?>
<?php unset($__componentOriginalfe26a99f60f8bc4594bf63469705f3a7); ?>
<?php endif; ?>
        </div>
        <div class="flex-1">
            <?php if (isset($component)) { $__componentOriginalfe26a99f60f8bc4594bf63469705f3a7 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.toggle-switch','data' => ['name' => 'is_active','label' => 'Active','checked' => $item ? $item->is_active : true,'helpText' => 'Show this brand in checkout selection and shop.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.toggle-switch'); ?>
<?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' => 'is_active','label' => 'Active','checked' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item ? $item->is_active : true),'help-text' => 'Show this brand in checkout selection and shop.']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7)): ?>
<?php $attributes = $__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7; ?>
<?php unset($__attributesOriginalfe26a99f60f8bc4594bf63469705f3a7); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalfe26a99f60f8bc4594bf63469705f3a7)): ?>
<?php $component = $__componentOriginalfe26a99f60f8bc4594bf63469705f3a7; ?>
<?php unset($__componentOriginalfe26a99f60f8bc4594bf63469705f3a7); ?>
<?php endif; ?>
        </div>
    </div>
</div>

<?php if($errors->any()): ?>
    <div
        class="mt-6 rounded-lg border border-red-200 dark:border-red-800/30 bg-red-50 dark:bg-red-950/20 p-4 text-sm text-red-700 dark:text-red-400">
        <ul class="list-disc space-y-1 pl-5">
            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li><?php echo e($error); ?></li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ul>
    </div>
<?php endif; ?>

<div class="mt-8 flex justify-end gap-3 border-t border-gray-200 dark:border-gray-800 pt-6">
    <a href="<?php echo e(route('admin.brands.index')); ?>" class="btn-danger">
        <i class="fas fa-times mr-2"></i>Cancel
    </a>
    <button class="btn-primary" type="submit">
        <i class="fas fa-plus"></i><?php echo e($item ? 'Update Brand' : 'Create Brand'); ?>

    </button>
</div><?php /**PATH /Users/mac/Documents/e-com/resources/views/admin/brands/_form.blade.php ENDPATH**/ ?>