!function(){function e(e,l){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);l&&(n=n.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),t.push.apply(t,n)}return t}function l(l){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach(function(e){t(l,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(e){Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(o,e))})}return l}function t(e,l,t){return(l=function(e){var l=function(e,l){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,l||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===l?String:Number)(e)}(e,"string");return"symbol"==typeof l?l:l+""}(l))in e?Object.defineProperty(e,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[l]=t,e}System.register(["../../../../common/preload-helper-legacy.CIXZiioE.js","../../index-legacy.CKwsq3d1.js","../../../../common/GroupControl.vue_vue_type_style_index_0_scoped_ac0e52be_lang-legacy.BhDSN6Mf.js","../../../../common/DnDDataTableControl.vue_vue_type_style_index_0_scoped_0b913e4f_lang-legacy.D1tDIuyM.js","../../../../common/GroupConditionalControl.vue_vue_type_style_index_0_scoped_96558d5e_lang-legacy.CHJO3hx-.js","../../../../common/LabelControl.vue_vue_type_script_setup_true_lang-legacy.9mLv6sKk.js","../../../../common/OptionsControl.vue_vue_type_style_index_0_scoped_f1f8db36_lang-legacy.Czfm27ET.js","../../../../common/index-legacy.BA7qrnNr.js","../../../../common/DeleteOutlined-legacy.Bc-rhxYC.js","../../../../common/_plugin-vue_export-helper-legacy.BVIICed7.js","../../../../common/index-legacy.CO4MsCT9.js","../../../../common/motion-legacy.C4TziduP.js","../../../../common/FormItemContext-legacy.CWXRIB7M.js","../../../../common/createContext-legacy.DxkS4L9s.js","../../../../common/statusUtils-legacy.UBMz6jtm.js","../../../../common/SearchOutlined-legacy.ARbIf1Me.js","../../../../common/compact-item-legacy.EWjDRkhe.js","../../../../common/index-legacy.CCpVcULI.js","../../../../common/index-legacy.BpZDMFyf.js","../../../../common/index-legacy.M32zB8dq.js","../../../../common/useState-legacy.C_VuFIfe.js","../../../../common/warning-legacy.BXrMpzCz.js","../../../../common/isPlainObject-legacy.DofypNUA.js","../../../../common/index-legacy.MrrsGG1-.js"],function(e,t){"use strict";var n,o,a,u,c,r,i,s,p,v,m,y,d,_,g,b,f,j,w;return{setters:[e=>{n=e.d,o=e.ar,a=e.A,u=e.bn,c=e.bo,r=e.bp,i=e.h,s=e.a9,p=e.aa,v=e.by,m=e.br,y=e.bw,d=e.bs},e=>{_=e.g,g=e.p},null,null,null,e=>{b=e._},null,e=>{f=e.I},e=>{j=e.D},e=>{w=e._},null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){const t={class:"wwp-row-handle"},O={class:"wwp-left-content"},x={class:"wwp-right-content"},h=["onClick"],k=["innerHTML"];e("default",w(n({__name:"OptionsControl",props:{params:{type:Object,required:!0}},emits:["input","fieldData"],setup(e,{emit:n}){const w=e,{params:P}=o(w),D=P.value,C=n,I=a([]),S=a([]),T=a(D.default),E=a(1);T.value.length>0?(E.value=T.value.length,T.value.forEach((e,l)=>{S.value=S.value.concat({key:l,value:e.value,text:e.text})})):S.value=S.value.concat({key:1,value:"",text:""});const q=_("optionValuePlaceholder",wp.i18n.__("Option Value","woocommerce-wholesale-prices")),L=_("optionTextPlaceholder",wp.i18n.__("Option Text","woocommerce-wholesale-prices")),A=()=>{E.value++,S.value=S.value.concat({key:E.value,value:"",text:""})};return(e,n)=>{var o,a;return u(),c("div",t,[r("div",O,[i(s(b),{params:s(D)},null,8,["params"])]),r("div",x,[(u(!0),c(p,null,v(S.value,e=>(u(),c("div",{key:e.key,class:"wwp-options-control"},[i(s(f),{"default-value":e.value,placeholder:s(q),onInput:t=>((e,t)=>{const n=S.value.map(n=>n.key===e?l(l({},n),{},{value:t}):n);S.value=n,I.value[D.id]=S.value,C("fieldData",I.value)})(e.key,t.target.value)},null,8,["default-value","placeholder","onInput"]),i(s(f),{"default-value":e.text,placeholder:s(L),onInput:t=>((e,t)=>{const n=S.value.map(n=>n.key===e?l(l({},n),{},{text:t}):n);S.value=n,I.value[D.id]=S.value,C("fieldData",I.value)})(e.key,t.target.value)},null,8,["default-value","placeholder","onInput"]),E.value>1?(u(),c("a",{key:0,onClick:l=>(e=>{E.value--;const l=S.value.filter(l=>l.key!==e);S.value=l,I.value[D.id]=S.value,C("fieldData",I.value)})(e.key)},[i(s(j))],8,h)):m("",!0)]))),128)),"undefined"!==s(D).btn_label?(u(),c("button",{key:0,class:y(["wwp-options-btn",s(D).btn_classes]),type:"button",onClick:A},d(s(D).btn_label),3)):m("",!0),"undefined"!==s(D).description?(u(),c("p",{key:1,innerHTML:s(g)(null!==(o=null===(a=s(D))||void 0===a?void 0:a.description)&&void 0!==o?o:"")},null,8,k)):m("",!0)])])}}}),[["__scopeId","data-v-f1f8db36"]]))}}})}();
