<div class="bda-card-area-box">
    <form class="ajax" action="{{ route('admin.frontend.embedded.feature.update') }}" method="POST"
          enctype="multipart/form-data" data-callback="formResponse">
        <div class="bda-tickets-list my-4">
            <div class="bda-mb-30 d-flex bda-gab-30 align-items-center flex-wrap">
                <div class="bda-form-group-check">
                    <input type="checkbox" name="embedded_feature_section_status"
                           id="embeddedFeatureSectionStatus" {{ ($frontendData?->embedded_feature_section_status == EMBEDDED_SECTION_STATUS_ENABLE) ? 'checked' : '' }}>
                    <label for="embeddedFeatureSectionStatus">{{__('Show/Hide Status')}}</label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="bda-from-box">
                    <p class="bda-text-label d-flex gap-2 align-items-center flex-wrap">{{__('Upload Image')}} <i title="{{__('Recommended size is 636 x 508 px')}}" class="ri-information-line"></i></p>
                    <label for="embeddedFeatureImage" class="image-upload">
                        <img class="avatar-preview"
                             src="{{getImageUrl($frontendData?->embedded_feature_image ?? 'assets/images/uplod-logo.png') }}"
                             alt="{{__('Upload Image')}}">
                        <input type="file" name="embedded_feature_image"
                               class="d-none file-input @error('embedded_feature_image') is-invalid @enderror"
                               id="embeddedFeatureImage" accept="image/*"/>
                    </label>
                    @error('embedded_feature_image')
                    <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">{{ __('Title') }}<span class="text-danger fs-5">*</span></label>
                    <input type="text" class="bda-from-control @error('embedded_feature_title') is-invalid @enderror"
                           name="embedded_feature_title" placeholder="{{__('Title')}}"
                           value="{{old('embedded_feature_title') ?? $frontendData?->embedded_feature_title}}">
                    @error('embedded_feature_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">{{ __('Short Description') }}<span class="text-danger fs-5">*</span></label>
                    <textarea name="embedded_feature_short_description" rows="3"
                              class="bda-from-control @error('embedded_feature_short_description') is-invalid @enderror"
                              placeholder="{{ __('Short Description') }}">{{$frontendData?->embedded_feature_short_description}}</textarea>
                    @error('embedded_feature_short_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>
