import{d as B,e as S,R as D,i as k,q as h,n as m,x as r,l as p,u as o,A as O,m as E,F as I,T as N,y as T,z as w}from"../../../../../common/index.CPcBO1Os.js";import{u as V,s as R,c as q}from"../../index.CjI1uML7.js";import z from"../controls/SaveSettingsButton.o1rTzwsp.js";import{F as b}from"../../../../../common/index.IU6dhWj-.js";import{S as F}from"../../../../../common/index.Dhyc5KML.js";import{_ as P}from"../../../../../common/_plugin-vue_export-helper.DlAUqK2U.js";import"../../../../../common/vue-router.jJOaD9p9.js";import"../../../../../common/index.TkDYtvUB.js";import"../../../../../common/index.BA7kDUNA.js";import"../../../../../common/index.B1jVoQr7.js";import"../../../../../common/index.B91jMiUk.js";import"../../../../../common/_getTag.5j88QV3u.js";import"../../../../../common/useState.DXwtWea_.js";import"../../../../../common/devWarning.DpJYEIzv.js";import"../../../../../common/compact-item.BK6dH04p.js";import"../../../../../common/Compact.B3btkLRg.js";import"../../../../../common/FormItem.NydyFVv4.js";import"../../../../../common/CloseCircleFilled.DsHyRhur.js";import"../../../../../common/ExclamationCircleFilled.CnnwVzET.js";import"../../../../../common/index.hZKuveGx.js";import"../../../../../common/zoom.DosRZx44.js";import"../../../../../common/Portal.B2TrUL41.js";import"../../../../../common/hasIn.DnK4nlor.js";import"../../../../../common/isPlainObject.BQqFxvSi.js";import"../../../../../common/responsiveObserve.DNGOudTN.js";import"../../../../../common/useFlexGapSupport.D-9C83pe.js";import"../../../../../common/styleChecker.BitQvUMr.js";import"../../../../../common/collapseMotion.PLgfPpML.js";import"../../../../../common/toNumber.DNMdcsO5.js";import"../../../../../common/QuestionCircleOutlined.CUT5E8l_.js";import"../../../../../common/FormItemContext.Bd2ze9Fn.js";import"../../../../../common/_arrayIncludes.BXKtlcwP.js";import"../../../../../common/_flatRest.CRlGMFOI.js";import"../../../../../common/debounce.vmjPqLDa.js";import"../../../../../common/KeyCode.D63Tfrq7.js";import"../../../../../common/BaseInput.CI-DlKb4.js";import"../../../../../common/pickAttrs.BFk0ToaQ.js";import"../../../../../common/slide.B35vT7ib.js";import"../../../../../common/index.Zb3sbx9p.js";import"../../../../../common/isMobile.BbN7I0i_.js";import"../../../../../common/omit.ddwJ_9WE.js";import"../../../../../common/useMergedState.B2De2-37.js";import"../../../../../common/DownOutlined.CHWCSFLU.js";import"../../../../../common/CheckOutlined.DJf0xGTx.js";import"../../../../../common/CloseOutlined.gy8y5blQ.js";import"../../../../../common/SearchOutlined.DD9qnnkl.js";import"../../../../../common/statusUtils.DMSJfhUg.js";import"../../../../../common/move.Dt4P6tio.js";const U={class:"field-help"},W=B({__name:"CouponDescriptionAi",setup(j){var c,g,d,f,v;const{__:i}=window.wp.i18n,C=V(),{agent:n,dataOptions:x}=R(C),s=S({...((c=n.value)==null?void 0:c.settings)||{},enabled:((d=(g=n.value)==null?void 0:g.settings)==null?void 0:d.enabled)||"no",language:((v=(f=n.value)==null?void 0:f.settings)==null?void 0:v.language)||"default"}),l=S(D.IDLE),u=k(()=>{var t;return(t=x.value.languages)!=null?t:{}}),{onFinish:L}=q(l),y=e=>{L(e)},A=(e,t)=>u.value[t.value].toLowerCase().includes(e.toLowerCase());return(e,t)=>(m(),h(o(b),{layout:"vertical",model:s.value,onFinish:y},{default:r(()=>[p(o(b).Item,{label:o(i)("Language:","storeagent-ai-for-woocommerce"),name:"language"},{default:r(()=>[p(o(F),{value:s.value.language,"onUpdate:value":t[0]||(t[0]=a=>s.value.language=a),placeholder:o(i)("Select language","storeagent-ai-for-woocommerce"),"show-search":"","filter-option":A},{default:r(()=>[(m(!0),E(I,null,N(u.value,(a,_)=>(m(),h(o(F).Option,{key:_,value:_},{default:r(()=>[T(w(a),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","placeholder"]),O("div",U,w(o(i)('Select the language for generated coupon descriptions. Choose "Default language" to use your WordPress default language.',"storeagent-ai-for-woocommerce")),1)]),_:1},8,["label"]),p(z,{saving:l.value},null,8,["saving"])]),_:1},8,["model"]))}}),qt=P(W,[["__scopeId","data-v-88665eba"]]);export{qt as default};
