<form action="<?php echo e(route('category.update', $category)); ?>" method="POST" enctype="multipart/form-data">
    <?php echo csrf_field(); ?>
    <?php echo method_field('PATCH'); ?>

    <div class="row g-4">
        <div class="col-md-6">
            <label class="form-label fw-bold">Category Name <span class="text-danger">*</span></label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['category_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="text" name="category_name"
                   value="<?php echo e(old('category_name', $category->category_name)); ?>" required>
            <?php $__errorArgs = ['category_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Description</label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="text" name="description"
                   value="<?php echo e(old('description', $category->description)); ?>">
            <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Current Image</label>
            <?php if($category->category_image): ?>
                <div class="mb-3">
                    <img src="<?php echo e(asset('storage/packages/category/' . $category->category_image)); ?>"
                         width="120" class="img-thumbnail rounded">
                </div>
            <?php endif; ?>
            <input type="file" name="category_image" accept="image/*" class="form-control <?php $__errorArgs = ['category_image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
            <?php $__errorArgs = ['category_image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Top Badge (SALE!)</label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['badge_text'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="text" name="badge_text"
                   value="<?php echo e(old('badge_text', $category->badge_text)); ?>" placeholder="SALE!">
            <?php $__errorArgs = ['badge_text'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Badge Color</label>
            <div class="d-flex flex-wrap gap-4 mt-2">
                <label class="form-check">
                    <input class="form-check-input" type="radio" name="badge_color" value="is-danger"
                           <?php echo e(old('badge_color', $category->badge_color) == 'is-danger' ? 'checked' : ''); ?>>
                    <span class="fw-bold text-danger">Red</span>
                </label>
                <label class="form-check">
                    <input class="form-check-input" type="radio" name="badge_color" value="is-success"
                           <?php echo e(old('badge_color', $category->badge_color) == 'is-success' ? 'checked' : ''); ?>>
                    <span class="fw-bold text-success">Green</span>
                </label>
                <label class="form-check">
                    <input class="form-check-input" type="radio" name="badge_color" value="is-warning"
                           <?php echo e(old('badge_color', $category->badge_color) == 'is-warning' ? 'checked' : ''); ?>>
                    <span class="fw-bold text-warning">Yellow</span>
                </label>
                <label class="form-check">
                    <input class="form-check-input" type="radio" name="badge_color" value="is-info"
                           <?php echo e(old('badge_color', $category->badge_color) == 'is-info' ? 'checked' : ''); ?>>
                    <span class="fw-bold text-info">Blue</span>
                </label>
                <label class="form-check">
                    <input class="form-check-input" type="radio" name="badge_color" value="is-primary"
                           <?php echo e(old('badge_color', $category->badge_color) == 'is-primary' ? 'checked' : ''); ?>>
                    <span class="fw-bold text-primary">Purple</span>
                </label>
            </div>
            <?php $__errorArgs = ['badge_color'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small d-block mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Ribbon (NEW)</label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['ribbon_text'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="text" name="ribbon_text"
                   value="<?php echo e(old('ribbon_text', $category->ribbon_text)); ?>" placeholder="NEW">
            <?php $__errorArgs = ['ribbon_text'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <div class="form-check form-switch mt-4">
                <input class="form-check-input" type="checkbox" name="is_featured" id="featured"
                       <?php echo e(old('is_featured', $category->is_featured) ? 'checked' : ''); ?>>
                <label class="form-check-label fw-bold" for="featured">Featured Category</label>
            </div>
        </div>

        <div class="col-md-6">
            <div class="form-check form-switch mt-4">
                <input class="form-check-input" type="checkbox" name="is_visible" id="visible"
                       <?php echo e(old('is_visible', $category->is_visible ?? 1) ? 'checked' : ''); ?>>
                <label class="form-check-label fw-bold" for="visible">Visible in Shop</label>
            </div>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Sort Order</label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['sort_order'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="number" name="sort_order"
                   value="<?php echo e(old('sort_order', $category->sort_order ?? 0)); ?>">
            <?php $__errorArgs = ['sort_order'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-md-6">
            <label class="form-label fw-bold">Background Color</label>
            <input class="form-control form-control-lg <?php $__errorArgs = ['background_color'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                   type="text" name="background_color"
                   value="<?php echo e(old('background_color', $category->background_color)); ?>" placeholder="#ff6b6b">
            <?php $__errorArgs = ['background_color'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>

        <div class="col-12">
            <label class="form-label fw-bold">Custom CSS</label>
            <textarea class="form-control font-monospace <?php $__errorArgs = ['custom_css'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                      name="custom_css" rows="4"><?php echo e(old('custom_css', $category->custom_css)); ?></textarea>
            <?php $__errorArgs = ['custom_css'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="text-danger small mt-1"><?php echo e($message); ?></div>
            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
        </div>
    </div>

    <div class="text-center mt-5">
        <button type="submit" class="btn btn-success btn-lg px-6 shadow-sm">
            SAVE CHANGES
        </button>
    </div>
</form><?php /**PATH C:\xampp8.2\htdocs\MCCMS\resources\views/manage/admin/partials/edit-category-form.blade.php ENDPATH**/ ?>