

<?php $__env->startSection('content'); ?>
    <h1 class="section-title text-4xl"><?php echo e($service->exists ? __('Edit') : __('Create New')); ?> <?php echo e(__('Services')); ?></h1>
    <form method="POST" enctype="multipart/form-data" action="<?php echo e($service->exists ? route('admin.services.update', $service) : route('admin.services.store')); ?>" class="mt-8 grid gap-5 lg:grid-cols-2">
        <?php echo csrf_field(); ?>
        <?php if($service->exists): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>
        <div><label class="label">English title</label><input name="title_en" class="field" value="<?php echo e(old('title_en', data_get($service->title, 'en'))); ?>"></div>
        <div><label class="label">Arabic title</label><input name="title_ar" class="field" value="<?php echo e(old('title_ar', data_get($service->title, 'ar'))); ?>"></div>
        <div><label class="label">English excerpt</label><textarea name="excerpt_en" class="field" rows="4"><?php echo e(old('excerpt_en', data_get($service->excerpt, 'en'))); ?></textarea></div>
        <div><label class="label">Arabic excerpt</label><textarea name="excerpt_ar" class="field" rows="4"><?php echo e(old('excerpt_ar', data_get($service->excerpt, 'ar'))); ?></textarea></div>
        <div><label class="label">English bullets</label><textarea name="bullets_en" class="field" rows="6"><?php echo e(old('bullets_en', implode(PHP_EOL, data_get($service->bullets, 'en', [])))); ?></textarea></div>
        <div><label class="label">Arabic bullets</label><textarea name="bullets_ar" class="field" rows="6"><?php echo e(old('bullets_ar', implode(PHP_EOL, data_get($service->bullets, 'ar', [])))); ?></textarea></div>
        <div>
            <label class="label">Image</label>
            <input type="file" name="image" accept="image/*" class="field">
            <?php if($service->image_path): ?>
                <img src="<?php echo e(asset('storage/'.$service->image_path)); ?>" alt="<?php echo e($service->translate('title', 'en')); ?>" class="mt-3 h-20 w-20 rounded-2xl object-cover">
                <label class="mt-3 flex items-center gap-3 text-sm font-semibold">
                    <input type="checkbox" name="remove_image" value="1">
                    Remove current image
                </label>
            <?php endif; ?>
        </div>
        <div><label class="label">Order</label><input name="sort_order" type="number" class="field" value="<?php echo e(old('sort_order', $service->sort_order ?? 0)); ?>"></div>
        <label class="flex items-center gap-3 text-sm font-semibold"><input type="checkbox" name="is_active" value="1" <?php echo e(old('is_active', $service->is_active ?? true) ? 'checked' : ''); ?>>Active</label>
        <div class="lg:col-span-2"><button class="btn-primary"><?php echo e(__('Save Changes')); ?></button></div>
    </form>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', ['title' => __('Services').' | Nivex'], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\Nivex\resources\views/admin/services/form.blade.php ENDPATH**/ ?>