@extends('admin.setting.index')

@section('sub_content')
    <div class="setting-layout-body">
        <div class="add-company">
            <div class="add-company-body">
                <form action="{{ route('admin.frontend.content.save') }}" class="disableSubmission add-company-form" method="POST" enctype="multipart/form-data">
                    @csrf
                    <div class="card style-two w-100">
                        <div class="card-header">
                            <p class="card-title">{{ __($pageTitle) }}</p>
                        </div>
                        <div class="card-body">
                            <div class="row c-gx-4 gy-3 gy-md-4">
                                <div class="col-12">
                                    <p class="heading">@lang('Banner')</h2>
                                </div>
                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Label One')</label>
                                    <input type="text" class="form--control md-style" name="label_one" value="{{ old('label_one', $frontend->data_values->label_one ?? '') }}" required>
                                </div>
                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Label Two')</label>
                                    <input type="text" class="form--control md-style" name="label_two" value="{{ old('label_two', $frontend->data_values->label_two ?? '') }}" required>
                                </div>
                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Label Three')</label>
                                    <input type="text" class="form--control md-style" name="label_three" value="{{ old('label_three', $frontend->data_values->label_three ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('Banner Title')</label>
                                    <input type="text" class="form--control md-style" name="banner_title" value="{{ old('banner_title', $frontend->data_values->banner_title ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('Banner Subtitle')</label>
                                    <input type="text" class="form--control md-style" name="banner_subtitle" value="{{ old('banner_subtitle', $frontend->data_values->banner_subtitle ?? '') }}" required>
                                </div>

                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Feature One')</label>
                                    <input type="text" class="form--control md-style" name="feature_one" value="{{ old('feature_one', $frontend->data_values->feature_one ?? '') }}" required>
                                </div>

                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Feature Two')</label>
                                    <input type="text" class="form--control md-style" name="feature_two" value="{{ old('feature_two', $frontend->data_values->feature_two ?? '') }}" required>
                                </div>

                                <div class="col-md-4">
                                    <label class="form--label style-two">@lang('Feature Three')</label>
                                    <input type="text" class="form--control md-style" name="feature_three" value="{{ old('feature_three', $frontend->data_values->feature_three ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <p class="heading">@lang('Knowledge Base Category')</h2>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('Knowledge Base Title')</label>
                                    <input type="text" class="form--control md-style" name="knowledge_base_title" value="{{ old('knowledge_base_title', $frontend->data_values->knowledge_base_title ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('Knowledge Base Subtitle')</label>
                                    <input type="text" class="form--control md-style" name="knowledge_base_subtitle" value="{{ old('knowledge_base_subtitle', $frontend->data_values->knowledge_base_subtitle ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <p class="heading">@lang('FAQ')</h2>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('FAQ Title')</label>
                                    <input type="text" class="form--control md-style" name="faq_title" value="{{ old('faq_title', $frontend->data_values->faq_title ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('FAQ Subtitle')</label>
                                    <input type="text" class="form--control md-style" name="faq_subtitle" value="{{ old('faq_subtitle', $frontend->data_values->faq_subtitle ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <p class="heading">@lang('CTA')</h2>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('CTA Title')</label>
                                    <input type="text" class="form--control md-style" name="cta_title" value="{{ old('cta_title', $frontend->data_values->cta_title ?? '') }}" required>
                                </div>

                                <div class="col-12">
                                    <label class="form--label style-two">@lang('CTA Subtitle')</label>
                                    <input type="text" class="form--control md-style" name="cta_subtitle" value="{{ old('cta_subtitle', $frontend->data_values->cta_subtitle ?? '') }}" required>
                                </div>

                                <div class="col-md-6">
                                    <label class="form--label style-two">@lang('Button Text')</label>
                                    <input type="text" class="form--control md-style" name="cta_button" value="{{ old('cta_button', $frontend->data_values->cta_button ?? '') }}" required>
                                </div>

                                <div class="col-md-6">
                                    <div class="image-uploader imageUploader">
                                        <label class="image-uploader-preview">
                                            <img src="{{ getImage(getFilePath('ctaImage') . '/' . ($frontend->data_values->cta_image ?? ''), getFileSize('ctaImage')) }}" class="imagePreview" alt="Preview" />
                                            <span class="icon">
                                                <i class="fa-solid fa-plus"></i>
                                            </span>
                                            <input type="file" name="cta_image" class="d-none imageInput" accept=".png, .jpg, .jpeg" />
                                        </label>
                                        <div class="image-uploader-content">
                                            <p class="title">@lang('Image')</p>
                                            <p class="note">
                                                @lang('Supported formats'): @lang('PNG, JPG, JPEG.')
                                            </p>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-12">
                                    <p class="heading">@lang('Authorization Page')</h2>
                                </div>

                                <div class="col-md-6">
                                    <label class="form--label style-two">@lang('Heading One')</label>
                                    <input type="text" class="form--control md-style" name="auth_heading_one" value="{{ old('auth_heading_one', $frontend->data_values->auth_heading_one ?? '') }}" required>
                                </div>
                                <div class="col-md-6">
                                    <label class="form--label style-two">@lang('Heading Two')</label>
                                    <input type="text" class="form--control md-style" name="auth_heading_two" value="{{ old('auth_heading_two', $frontend->data_values->auth_heading_two ?? '') }}" required>
                                </div>
                                <div class="col-md-6">
                                    <label class="form--label style-two">@lang('Subheading')</label>
                                    <input type="text" class="form--control md-style" name="auth_subheading" value="{{ old('auth_subheading', $frontend->data_values->auth_subheading ?? '') }}" required>
                                </div>

                                <div class="col-md-6">
                                    <div class="image-uploader imageUploader">
                                        <label class="image-uploader-preview">
                                            <img src="{{ getImage(getFilePath('authorizationPage') . '/' . ($frontend->data_values->image ?? ''), getFileSize('authorizationPage')) }}" class="imagePreview" alt="Preview" />
                                            <span class="icon">
                                                <i class="fa-solid fa-plus"></i>
                                            </span>
                                            <input type="file" name="image" class="d-none imageInput" accept=".png, .jpg, .jpeg" />
                                        </label>
                                        <div class="image-uploader-content">
                                            <p class="title">@lang('Image')</p>
                                            <p class="note">
                                                @lang('Supported formats'): @lang('PNG, JPG, JPEG.')
                                            </p>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-12">
                                    <button type="submit" class="btn btn--base w-100 btn--md">@lang('Submit')</button>
                                </div>
                            </div>
                        </div>

                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection


@push('style')
    <style>
        .heading {
            display: flex;
            align-items: center;
            text-align: center;
            font-size: 15px;
            color: #333;
            margin: 10px 0;
        }

        .heading::before,
        .heading::after {
            content: "";
            flex: 1;
            border-bottom: 1px solid hsl(var(--border-color));
        }

        .heading:not(:empty)::before {
            margin-right: 10px;
        }

        .heading:not(:empty)::after {
            margin-left: 10px;
        }

        .heading span {
            white-space: nowrap;
        }
    </style>
@endpush
