<?php ($item = $user ?? null); ?>

<div class="space-y-6">
    <?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' => 'Name','value' => old('name', $item?->name),'required' => true,'placeholder' => 'Enter user name']] + (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' => 'Name','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('name', $item?->name)),'required' => true,'placeholder' => 'Enter user name']); ?>
<?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' => 'email','type' => 'email','label' => 'Email','value' => old('email', $item?->email),'required' => true,'placeholder' => 'Enter email address']] + (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' => 'email','type' => 'email','label' => 'Email','value' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(old('email', $item?->email)),'required' => true,'placeholder' => 'Enter email address']); ?>
<?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)) { $__componentOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.select-input','data' => ['name' => 'role','label' => 'Role','required' => true]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.select-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' => 'role','label' => 'Role','required' => true]); ?>
        <option value="admin" <?php echo e(old('role', $item?->role) === 'admin' ? 'selected' : ''); ?>>Administrator</option>
        <option value="super_admin" <?php echo e(old('role', $item?->role) === 'super_admin' ? 'selected' : ''); ?>>Super Administrator</option>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230)): ?>
<?php $attributes = $__attributesOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230; ?>
<?php unset($__attributesOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230)): ?>
<?php $component = $__componentOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230; ?>
<?php unset($__componentOriginalf05cfa8a3a9bfe3c0fbbaf4a0e88f230); ?>
<?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' => 'password','type' => 'password','label' => $item ? 'New Password' : 'Password','required' => !$item,'placeholder' => ''.e($item ? 'Enter new password (leave blank to keep current password)' : 'Enter password (minimum 8 characters)').'']] + (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' => 'password','type' => 'password','label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item ? 'New Password' : 'Password'),'required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(!$item),'placeholder' => ''.e($item ? 'Enter new password (leave blank to keep current password)' : 'Enter password (minimum 8 characters)').'']); ?>
<?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' => 'password_confirmation','type' => 'password','label' => $item ? 'Confirm New Password' : 'Confirm Password','required' => !$item,'placeholder' => 'Confirm password']] + (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' => 'password_confirmation','type' => 'password','label' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item ? 'Confirm New Password' : 'Confirm Password'),'required' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(!$item),'placeholder' => 'Confirm password']); ?>
<?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>

<div class="mt-6 md:mt-8 flex flex-col sm:flex-row items-stretch sm:items-center justify-end gap-3 sm:gap-4 pt-4 md:pt-6 border-t border-gray-200 dark:border-gray-800">
    <a href="<?php echo e(route('admin.users.index')); ?>" class="btn-danger">
        <i class="fas fa-times mr-2"></i>Cancel
    </a>
    <button type="submit" class="btn-primary">
        <i class="fas fa-save mr-2"></i><?php echo e($item ? 'Update User' : 'Create User'); ?>

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