System.register(["./preload-helper-legacy.CIXZiioE.js","./settings-store-legacy.BzmgUa8U.js","../apps/settings/index-legacy.CKwsq3d1.js","./SectionArea.vue_vue_type_script_setup_true_lang-legacy.Bef44WSl.js","./GeneralUnlock.vue_vue_type_style_index_0_lang-legacy.Dg7A7p5w.js","./FreeGuide.vue_vue_type_style_index_0_lang-legacy.thxfdMk-.js","./index-legacy.Byn8FqiS.js","./index-legacy.BpZDMFyf.js"],function(e,a){"use strict";var l,t,n,i,s,u,r,o,c,d,v,b,_,p,y,g,h,k,w,m,f,j,x,D,T,S,q,A;return{setters:[e=>{l=e.d,t=e.ar,n=e.bm,i=e.A,s=e.bn,u=e.bq,r=e.bu,o=e.bo,c=e.aa,d=e.by,v=e.a9,b=e.bw,_=e.bp,p=e.bs,y=e.h,g=e.a4,h=e.br,k=e.bx},e=>{w=e.u},e=>{m=e.b,f=e.g,j=e.e},e=>{x=e._},e=>{D=e._},e=>{T=e._},e=>{S=e.A,q=e.T},e=>{A=e.B}],execute:function(){const a={key:0},C={key:1};e("_",l({__name:"ChildTabs",props:{parentData:{type:Object,required:!0},parentTab:{type:String,required:!0}},emits:["fieldData"],setup(e,{emit:l}){var K,L,O;const B=e,{parentData:F,parentTab:G}=t(B),U=w(),{isLoading:z,externalLinks:E}=n(U),P=F,Y=i(window.lodash.sortBy(P.value,e=>e.sort)),H=G,I=m("tab-child"),J=i(null!==(K=null===(L=Object.values(Y.value))||void 0===L?void 0:L[0])&&void 0!==K?K:""),M=i(null!==(O=null!=I?I:J.value.key)&&void 0!==O?O:""),N=i([]),Q=l,R=e=>{Object.entries(e).forEach(([e,a])=>{N.value[e]=a}),Q("fieldData",N.value)},V=(e,a)=>{const l=i(void 0!==a.link),t=i(!!a.external).value?"_blank":"_self",n=i(null!=a&&a.with_background?"tab-with-bg":"");return l.value?(e in E.value||(E.value[e]=a.link),k("a",{class:"tab-child-item",href:a.link,target:t},a.label)):k("span",{class:"tab-child-item "+n.value},a.label)};return(e,l)=>(s(),u(v(q),{activeKey:M.value,"onUpdate:activeKey":l[0]||(l[0]=e=>M.value=e),"tab-position":"left","destroy-inactive-tab-pane":!0,onChange:l[1]||(l[1]=e=>{var a;(a=M.value)in E.value||(j("tab-child",a),M.value=a)})},{default:r(()=>[(s(!0),o(c,null,d(Y.value,e=>(s(),u(v(S),{key:e.key,"force-render":!0,class:b("wwp-child-tab"),tab:V(e.key,e)},{default:r(()=>[null!=(null==e?void 0:e.link)?(s(),o("div",a,[_("h3",null,p(v(f)("redirectLoading",v(wp.i18n.__)("You are redirecting to a page. Please wait...","woocommerce-wholesale-prices"))),1)])):(s(),o("div",C,[_("h3",null,p(e.label),1),l[2]||(l[2]=_("hr",null,null,-1)),y(x,{"parent-tab":v(H),"child-tab":e.key,"section-data":e.sections,onFieldData:R},null,8,["parent-tab","child-tab","section-data"]),l[3]||(l[3]=_("br",null,null,-1)),!0!==e.no_save?(s(),u(v(A),{key:0,type:"primary","html-type":"submit",class:"wwp-settings-save-btn",loading:v(z)},{default:r(()=>[g(p(v(f)("submitText",v(wp.i18n.__)("Save Changes","woocommerce-wholesale-prices"))),1)]),_:1},8,["loading"])):h("",!0),null!=(null==e?void 0:e.show_unlock_upgrade)?(s(),u(D,{key:1})):h("",!0),null!=(null==e?void 0:e.show_free_guide)?(s(),u(T,{key:2})):h("",!0)]))]),_:2},1032,["tab"]))),128))]),_:1},8,["activeKey"]))}}))}}});
