<?php $__env->startSection('title', $title); ?>
<?php $__env->startSection('ad_page_title', 'Edit Contact Us Page'); ?>
<?php $__env->startSection('ad_page_subtitle', 'Edit labels/text (EN/AR) + SEO'); ?>

<?php $__env->startSection('ad_content'); ?>
    <?php
        $contentEn = $contentEn ?? [];
        $contentAr = $contentAr ?? [];
    ?>

    <div class="container-fluid py-4">
        <div class="mb-4">
            <h1 class="h3 mb-1">Contact Us Page</h1>
            <p class="text-muted mb-0">Edit the contact page header, strip, map, and inquiry form labels.</p>
        </div>

        <?php if(session('success')): ?>
            <div class="alert alert-success" role="alert"><?php echo e(session('success')); ?></div>
        <?php endif; ?>

        <?php if($errors->any()): ?>
            <div class="alert alert-danger" role="alert">
                <ul class="mb-0">
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><?php echo e($error); ?></li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </ul>
            </div>
        <?php endif; ?>

        <form action="<?php echo e(route('admin.pages.contact-us.update')); ?>" method="POST">
            <?php echo csrf_field(); ?>
            <?php echo method_field('PUT'); ?>

            <div class="card shadow-sm border-0">
                <div class="card-body p-4">
                    <ul class="nav nav-tabs mb-4" role="tablist">
                        <li class="nav-item" role="presentation">
                            <button class="nav-link active" type="button" data-bs-toggle="tab" data-bs-target="#tab-en" role="tab">English</button>
                        </li>
                        <li class="nav-item" role="presentation">
                            <button class="nav-link" type="button" data-bs-toggle="tab" data-bs-target="#tab-ar" role="tab" dir="rtl">Arabic</button>
                        </li>
                    </ul>

                    <div class="tab-content">
                        <div class="tab-pane fade show active" id="tab-en" role="tabpanel">
                            <div class="row g-4">
                                <div class="col-12"><div class="fw-bold mb-2">Page header</div></div>
                                <div class="col-lg-4">
                                    <label class="form-label">Kicker</label>
                                    <input class="form-control" name="en[page][kicker]" value="<?php echo e(old('en.page.kicker', data_get($contentEn, 'page.kicker'))); ?>">
                                </div>
                                <div class="col-lg-4">
                                    <label class="form-label">Heading</label>
                                    <input class="form-control" name="en[page][heading]" value="<?php echo e(old('en.page.heading', data_get($contentEn, 'page.heading'))); ?>">
                                </div>
                                <div class="col-lg-4">
                                    <label class="form-label">Description</label>
                                    <textarea class="form-control" rows="2" name="en[page][description]"><?php echo e(old('en.page.description', data_get($contentEn, 'page.description'))); ?></textarea>
                                </div>
                                <?php echo $__env->make('admin.pages._contact-block-fields', ['prefix' => 'en', 'c' => $contentEn], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </div>
                        </div>

                        <div class="tab-pane fade" id="tab-ar" role="tabpanel">
                            <div class="row g-4" dir="rtl">
                                <div class="col-12"><div class="fw-bold mb-2">عنوان الصفحة</div></div>
                                <div class="col-lg-4">
                                    <label class="form-label">Kicker</label>
                                    <input class="form-control" name="ar[page][kicker]" value="<?php echo e(old('ar.page.kicker', data_get($contentAr, 'page.kicker'))); ?>">
                                </div>
                                <div class="col-lg-4">
                                    <label class="form-label">Heading</label>
                                    <input class="form-control" name="ar[page][heading]" value="<?php echo e(old('ar.page.heading', data_get($contentAr, 'page.heading'))); ?>">
                                </div>
                                <div class="col-lg-4">
                                    <label class="form-label">Description</label>
                                    <textarea class="form-control" rows="2" name="ar[page][description]"><?php echo e(old('ar.page.description', data_get($contentAr, 'page.description'))); ?></textarea>
                                </div>
                                <?php echo $__env->make('admin.pages._contact-block-fields', ['prefix' => 'ar', 'c' => $contentAr], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                            </div>
                        </div>
                    </div>

                    <hr class="my-4">
                    <?php echo $__env->make('admin.pages._seo-fields', ['seo' => $seo], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

                    <div class="d-flex justify-content-end gap-2 mt-4">
                        <a href="<?php echo e(route('admin.dashboard')); ?>" class="btn btn-light border">Cancel</a>
                        <button type="submit" class="btn btn-primary px-4">Save Changes</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.ad_master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/onesourceerp/public_html/project/resources/views/admin/pages/contact-us/edit.blade.php ENDPATH**/ ?>