@extends('layouts.app')
@push('title')
    {{ $pageTitle }}
@endpush
@push('style')
    <link rel="stylesheet" href="{{ asset('vendors/summernote/summernote-bs5.css') }}">
@endpush
@section('content')

    <div class="page-content-wrapper bda-pb-100 bda-pt-30 bda-px-18 ">
        <div class="bda-mb-30">
            <!-- breadcrumb  -->
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb bda-breadcrumb">
                    <li class="breadcrumb-item title-light">{{$previousBreadcrumb}}</a></li>
                    <li class="breadcrumb-item active " aria-current="page">{{$breadcrumb}}</li>
                </ol>
            </nav>
        </div>
        <!-- data table area start -->
        <div class="bda-table-data overflow-x-auto">
            <div class="bda-card-area-box">
                <form class="ajax" action="{{ route('admin.frontend.store.terms.condition') }}" method="POST"
                      enctype="multipart/form-data" data-callback="formResponse">
                    @csrf
                    <div class="row">
                        <div class="col-md-6">
                            <div class="bda-from-box">
                                <label class="bda-text-label">{{ __('Title') }}<span class="text-danger fs-5">*</span></label>
                                <input type="text" class="bda-from-control @error('title') is-invalid @enderror"
                                       name="title" placeholder="{{__('Title')}}"
                                       value="{{ $termsConditionData?->title }}">
                                @error('title')
                                <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="bda-from-box">
                                <label class="bda-text-label">{{ __('Sub Title') }}</label>
                                <input type="text" class="bda-from-control @error('sub_title') is-invalid @enderror"
                                       name="sub_title" placeholder="{{__('Sub Title')}}"
                                       value="{{ $termsConditionData?->sub_title }}">
                                @error('sub_title')
                                <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="bda-from-box">
                                <label class="bda-text-label">{{ __('Description') }}<span class="text-danger fs-5">*</span></label>
                                <textarea name="description"
                                          class="bda-from-control summernote @error('description') is-invalid @enderror"
                                          rows="3">{{ $termsConditionData?->description }}</textarea>
                                @error('description')
                                <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                                    <strong>{{ $message }}</strong>
                                </span>
                                @enderror
                            </div>
                        </div>

                        <div>
                            <button type="submit" class="bda-btu-theme">{{__('Submit')}}</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
@endsection
@push('script')
    <script src="{{ asset('vendors/summernote/summernote-bs5.js') }}"></script>
    <script src="{{asset('assets/js/custom/admin/terms.js')}}"></script>
@endpush
