System.register(["../../../../common/index-legacy.DRKniymH.js","../../../../common/settings-store-legacy.DRLLI9we.js","../../../../common/pinia-legacy.CU8UeoTp.js","../../../../common/PresetControl.vue_vue_type_style_index_0_scoped_c9e2dd9e_lang-legacy.CBGxOGwC.js","../../../../common/Preview.vue_vue_type_style_index_0_scoped_e226939c_lang-legacy.Ceu-Swp9.js","../../../../common/Confirmation.vue_vue_type_script_setup_true_lang-legacy.CIhxBO6H.js","../../../../common/LabelControl.vue_vue_type_script_setup_true_lang-legacy.DL25Ke3f.js","../../../../common/Tooltip.vue_vue_type_script_setup_true_lang-legacy.C9WyNJUi.js","../../../../common/_plugin-vue_export-helper-legacy.DgAO6S8O.js","../../../../common/transition-legacy.DZbCmrRe.js","../../../../common/keyboard-legacy.ItkZdbDJ.js","../../../../common/open-closed-legacy.CWZrlJ6W.js","../../../../common/micro-task-legacy.D9KKWy-6.js"],(function(e,t){"use strict";var l,a,s,o,u,i,n,c,r,v,m,d,p,_,w,g,y,f,b,j,x,k;return{setters:[e=>{l=e.d,a=e.t,s=e.r,o=e.o,u=e.c,i=e.b,n=e.e,c=e.u,r=e.Z,v=e.a2,m=e.M,d=e.N,p=e.a,_=e.G,w=e.g,g=e.a0,y=e.Q},e=>{f=e.u},e=>{b=e.s},null,null,null,e=>{j=e._},e=>{x=e._},e=>{k=e._},null,null,null,null],execute:function(){const t={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},h={class:"stwlite-tw-flex stwlite-tw-items-center stwlite-tw-mb-2 stwlite-tw-gap-2"},C=["disabled"],P=["value"],T={key:0},D=["href"],L={key:1},M=["placeholder","name"],U=["innerHTML"];e("default",k(l({__name:"LinkControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(e,{emit:l}){const k=e,{params:V}=a(k),H=f(),{showPopup:I,componentUpgrade:S}=b(H),q=V.value,A=s(q.options),B=s(q.links),G=s(q.default),N=s(G.value),O=s(q.disabled??!1),Q=l,Z=s([]),z=s(q.with_text_condition??!1),E=s(!!q.custom_link),F=s(""!=q.custom_link?q.custom_link:"");if(""!==N.value&&!O.value){let e=N.value;"custom"==N.value&&(e=F.value),Z.value[q.id]=e,Q("fieldData",Z.value)}const J=e=>{void 0!==q.pro&&null!==q.pro?(void 0!==q.pro_on_active&&null!==q.pro_on_active?q.pro_on_active&&""!==N.value&&(I.value=!0,N.value=""):(I.value=!0,N.value=G.value),S.value=q.pro):("custom"==e?(E.value=!0,Z.value[q.id]=F.value):(E.value=!1,Z.value[q.id]=e),Q("fieldData",Z.value))},K=()=>{Z.value[q.id]=F.value,Q("fieldData",Z.value)};return(e,l)=>(o(),u("div",null,[i("div",t,[n(c(j),{params:c(q)},null,8,["params"])]),i("div",h,[r(i("select",{"onUpdate:modelValue":l[0]||(l[0]=e=>N.value=e),onChange:J,disabled:O.value,class:"stwlite-tw-block stwlite-tw-w-full stwlite-tw-max-w-xs stwlite-tw-rounded-md stwlite-tw-border-gray-300 stwlite-tw-shadow-sm focus:stwlite-tw-border-blue-500 focus:stwlite-tw-ring-blue-500 stwlite-tw-px-3 stwlite-tw-py-2 stwlite-tw-border"},[(o(!0),u(m,null,d(A.value,((e,t)=>(o(),u("option",{key:t,value:t},p(e),9,P)))),128))],40,C),[[v,N.value]]),n(c(x),{params:c(q)},null,8,["params"])]),E.value?w("",!0):(o(),u("div",T,[i("a",{href:B.value[N.value],target:"_blank"},p(c(_)("viewPageText",c(wp.i18n.__)("View Page","saveto-wishlist-lite-for-woocommerce"))),9,D)])),z.value&&E.value?(o(),u("div",L,[r(i("input",{"onUpdate:modelValue":l[1]||(l[1]=e=>F.value=e),placeholder:c(q).placeholder,name:c(q).id,onInput:K},null,40,M),[[g,F.value]])])):w("",!0),"undefined"!==c(q).description?(o(),u("p",{key:2,class:"stwlite-tw-text-sm stwlite-tw-text-gray-600 stwlite-tw-mt-2",innerHTML:c(y)(c(q)?.description??"")},null,8,U)):w("",!0)]))}}),[["__scopeId","data-v-697b4f41"]]))}}}));
