<?php $category = $category ?? null; ?>
<div>
    <label class="block text-sm font-medium mb-1">Üst Kategori</label>
    <select name="parent_id" class="w-full border rounded px-3 py-2">
        <option value="">Yok</option>
        <?php $__currentLoopData = $parents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $parent): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($parent->id); ?>" <?php if(old('parent_id', $category?->parent_id)==$parent->id): echo 'selected'; endif; ?>><?php echo e($parent->name); ?></option>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </select>
</div>
<div>
    <label class="block text-sm font-medium mb-1">Kategori Adı</label>
    <input type="text" name="name" value="<?php echo e(old('name', $category?->name)); ?>" required class="w-full border rounded px-3 py-2">
</div>
<div>
    <label class="block text-sm font-medium mb-1">Açıklama</label>
    <textarea name="description" class="w-full border rounded px-3 py-2"><?php echo e(old('description', $category?->description)); ?></textarea>
</div>
<div>
    <label class="block text-sm font-medium mb-1">Durum</label>
    <select name="status" class="w-full border rounded px-3 py-2">
        <option value="active" <?php if(old('status', $category?->status ?? 'active')==='active'): echo 'selected'; endif; ?>>Aktif</option>
        <option value="passive" <?php if(old('status', $category?->status)==='passive'): echo 'selected'; endif; ?>>Pasif</option>
    </select>
</div>
<?php /**PATH C:\Users\a-azr\Desktop\kolayabonelik\resources\views/panel/categories/_form.blade.php ENDPATH**/ ?>