<h1 class="bda-fs-24 title-light">{{__('Edit Ai Support Feature Item')}}</h1>
<div class="bda-pt-30">
    <form class="ajax" data-modal-id="aiSupportFeatureItemUpdate" data-table-id="aiSupportFeatureItemDataTable"
          action="{{route('admin.frontend.ai.support.feature.item.update')}}" method="POST"
          enctype="multipart/form-data" data-callback="formResponse">
        @csrf
        <input type="hidden" name="updateId" value="{{encrypt($itemData->id)}}">
        <div class="row">
            <div class="col-md-12">
                <div class="bda-from-box">
                    <div class="bda-form-group-check">
                        <input type="checkbox" class="d-none" id="aiSupportFeatureItemStatus"
                               name="ai_support_feature_item_status" {{old('ai_support_feature_item_status', $itemData->ai_support_feature_item_status)== AI_SUPPORT_FEATURE_ITEM_STATUS_ENABLE ? 'checked' : ''}}>
                        <label for="aiSupportFeatureItemStatus">{{ __('Enable Status') }}</label>
                    </div>
                </div>
            </div>
            <div class="col-md-12">
                <div class="bda-from-box">
                    <label class="bda-text-label">{{ __('Tile') }}</label>
                    <input type="text"
                           class="bda-from-control @error('ai_support_feature_item_title') is-invalid @enderror"
                           name="ai_support_feature_item_title" placeholder="{{ __('Title') }}"
                           value="{{old('ai_support_feature_item_title') ?? $itemData?->ai_support_feature_item_title}}">
                    @error('ai_support_feature_item_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') }}</label>
                    <textarea name="ai_support_feature_item_short_description"
                              class="bda-from-control @error('ai_support_feature_item_short_description') is-invalid @enderror"
                              rows="3"
                              placeholder="{{__('Short Description')}}">{{$itemData?->ai_support_feature_item_short_description}}</textarea>
                    @error('ai_support_feature_item_short_description')
                    <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                    @enderror
                </div>
            </div>
            <div class="d-flex gap-3">
                <div class="bda-from-box">
                    <label class="bda-text-label">{{__('Tab Icon')}}</label>
                    <label for="editTabIcon" class="image-upload">
                        <img class="avatar-preview"
                             src="{{getImageUrl($itemData?->ai_support_feature_tab_icon ?? 'assets/images/uplod-logo.png')}}"
                             alt="{{__('Ai Support Feature Tab Icon')}}">
                        <input type="file" name="ai_support_feature_tab_icon"
                               class="d-none file-input @error('ai_support_feature_tab_icon') is-invalid @enderror"
                               id="editTabIcon" accept="image/*"/>
                    </label>
                    @error('ai_support_feature_tab_icon')
                    <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                    @enderror
                </div>
                <div class="bda-from-box">
                    <label class="bda-text-label">{{__('Upload Image')}}</label>
                    <label for="editTabImage" class="image-upload">
                        <img class="avatar-preview"
                             src="{{getImageUrl($itemData?->ai_support_feature_tab_image ?? 'assets/images/uplod-logo.png')}}"
                             alt="{{__('Ai Support Feature Tab Image')}}">
                        <input type="file" name="ai_support_feature_tab_image"
                               class="d-none file-input @error('ai_support_feature_tab_image') is-invalid @enderror"
                               id="editTabImage" accept="image/*"/>
                    </label>
                    @error('ai_support_feature_tab_image')
                    <span class="invalid-feedback mb-3 mt-0 pt-0" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                    @enderror
                </div>
            </div>
            <div class="modal-footer flex-wrap border-0 gap-3 p-0">
                <button type="button" class="bda-btu-theme-border" data-bs-dismiss="modal">{{__('Close')}}</button>
                <button type="submit" class="bda-btu-theme">{{__('Save changes')}}</button>
            </div>
        </div>
    </form>
</div>

