<?php if (isset($component)) { $__componentOriginale0f1cdd055772eb1d4a99981c240763e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale0f1cdd055772eb1d4a99981c240763e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin-layout','data' => ['title' => $item->exists ? 'Edit Membership Tier' : 'Create Membership Tier']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin-layout'); ?>
<?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(['title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($item->exists ? 'Edit Membership Tier' : 'Create Membership Tier')]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

    <?php if (isset($component)) { $__componentOriginal7a344b505e1336540478804fcfa6cd54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7a344b505e1336540478804fcfa6cd54 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.admin.form-panel','data' => ['backRoute' => route('admin.membership-tiers.index')]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('admin.form-panel'); ?>
<?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(['back-route' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('admin.membership-tiers.index'))]); ?>
<?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::processComponentKey($component); ?>

        <form method="POST" action="<?php echo e($item->exists ? route('admin.membership-tiers.update', $item) : route('admin.membership-tiers.store')); ?>" class="space-y-4">
            <?php echo csrf_field(); ?>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item->exists): ?> <?php echo method_field('PUT'); ?> <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <div class="grid grid-cols-2 gap-4">
                <div>
                    <label class="block text-sm font-medium">Name</label>
                    <input name="name" value="<?php echo e(old('name', $item->name)); ?>" class="admin-input" required>
                </div>
                <div>
                    <label class="block text-sm font-medium">Slug</label>
                    <input name="slug" value="<?php echo e(old('slug', $item->slug)); ?>" class="admin-input" required>
                </div>
            </div>
            <div>
                <label class="block text-sm font-medium">Description</label>
                <textarea name="description" rows="3" class="admin-input"><?php echo e(old('description', $item->description)); ?></textarea>
            </div>
            <div class="grid grid-cols-3 gap-4">
                <div>
                    <label class="block text-sm font-medium">Price (cents)</label>
                    <input type="number" name="price_cents" value="<?php echo e(old('price_cents', $item->price_cents)); ?>" class="admin-input" required>
                </div>
                <div>
                    <label class="block text-sm font-medium">Currency</label>
                    <input name="currency" value="<?php echo e(old('currency', $item->currency ?? 'AED')); ?>" class="admin-input" required maxlength="3">
                </div>
                <div>
                    <label class="block text-sm font-medium">Billing Period</label>
                    <select name="billing_period" class="admin-input" required>
                        <option value="month" <?php if(old('billing_period', $item->billing_period) === 'month'): echo 'selected'; endif; ?>>Month</option>
                        <option value="year" <?php if(old('billing_period', $item->billing_period) === 'year'): echo 'selected'; endif; ?>>Year</option>
                    </select>
                </div>
            </div>
            <div class="grid grid-cols-3 gap-4">
                <div>
                    <label class="block text-sm font-medium">Badge Text</label>
                    <input name="badge_text" value="<?php echo e(old('badge_text', $item->badge_text)); ?>" class="admin-input">
                </div>
                <div>
                    <label class="block text-sm font-medium">CTA Variant</label>
                    <select name="cta_variant" class="admin-input" required>
                        <option value="ghost" <?php if(old('cta_variant', $item->cta_variant ?? 'ghost') === 'ghost'): echo 'selected'; endif; ?>>Ghost</option>
                        <option value="primary" <?php if(old('cta_variant', $item->cta_variant) === 'primary'): echo 'selected'; endif; ?>>Primary</option>
                    </select>
                </div>
                <div>
                    <label class="block text-sm font-medium">Sort Order</label>
                    <input type="number" name="sort_order" value="<?php echo e(old('sort_order', $item->sort_order ?? 0)); ?>" class="admin-input" required>
                </div>
            </div>
            <div class="flex gap-6">
                <label class="flex items-center gap-2">
                    <input type="checkbox" name="is_featured" value="1" <?php if(old('is_featured', $item->is_featured ?? false)): echo 'checked'; endif; ?>>
                    <span class="text-sm font-medium">Featured</span>
                </label>
                <label class="flex items-center gap-2">
                    <input type="checkbox" name="is_active" value="1" <?php if(old('is_active', $item->is_active ?? true)): echo 'checked'; endif; ?>>
                    <span class="text-sm font-medium">Active</span>
                </label>
            </div>
            <button type="submit" class="admin-btn-primary">Save</button>
        </form>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7a344b505e1336540478804fcfa6cd54)): ?>
<?php $attributes = $__attributesOriginal7a344b505e1336540478804fcfa6cd54; ?>
<?php unset($__attributesOriginal7a344b505e1336540478804fcfa6cd54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7a344b505e1336540478804fcfa6cd54)): ?>
<?php $component = $__componentOriginal7a344b505e1336540478804fcfa6cd54; ?>
<?php unset($__componentOriginal7a344b505e1336540478804fcfa6cd54); ?>
<?php endif; ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $attributes = $__attributesOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__attributesOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale0f1cdd055772eb1d4a99981c240763e)): ?>
<?php $component = $__componentOriginale0f1cdd055772eb1d4a99981c240763e; ?>
<?php unset($__componentOriginale0f1cdd055772eb1d4a99981c240763e); ?>
<?php endif; ?>
<?php /**PATH /Users/mac/Documents/WhiteTiger/website/headbanger/resources/views/admin/membership-tiers/form.blade.php ENDPATH**/ ?>