System.register(["./index-legacy.DRKniymH.js","./settings-store-legacy.DRLLI9we.js","./pinia-legacy.CU8UeoTp.js","./ChildTabs.vue_vue_type_script_setup_true_lang-legacy.Oayjs5-H.js","./Notification.vue_vue_type_script_setup_true_lang-legacy.CmKZ4RFn.js","./tabs-legacy.enxRfxlS.js"],(function(t,e){"use strict";var s,l,a,i,w,r,n,u,o,c,d,p,b,g,y,v,m,f,_,x,h,j,k,O,S,C,N,T,V;return{setters:[t=>{s=t.d,l=t.I,a=t.J,i=t.K,w=t.r,r=t.o,n=t.c,u=t.b,o=t.L,c=t.e,d=t.w,p=t.u,b=t.M,g=t.N,y=t.h,v=t.H,m=t.a,f=t.g,_=t.O,x=t.P},t=>{h=t.u},t=>{j=t.s},t=>{k=t._},t=>{O=t._},t=>{S=t.p,C=t.x,N=t.I,T=t.y,V=t.m}],execute:function(){const e={class:"stwlite-tw-w-full"},A={key:0,class:"stwlite-tw-max-w-7xl stwlite-tw-mx-auto stwlite-tw-flex stwlite-tw-items-center stwlite-tw-space-x-4 stwlite-tw-px-3 stwlite-tw-pb-0 stwlite-tw-pt-6 stwlite-tw-border-0"},F=["onClick"];t("_",s({__name:"ParentTabs",setup(t,{expose:s}){const I=h(),{isLoading:J,inputValues:L}=j(I),P=l.settings.tabs,D=a("tab"),E=i(D,P),H=w(Object.values(P)?.[0]??""),K=w(E??H.value.key),M=w(""),U=w(""),q=w(""),z=t=>{Object.entries(t).forEach((([t,e])=>{L.value[t]=e}))},B=async t=>{J.value=!0;const e=[];for(const[l,a]of Object.entries(L.value)){let t=a;"object"==typeof a&&null!==a&&(t=JSON.stringify(a)),e.push({key:l,value:t})}try{const t=await _(e);t&&(q.value=t.title,M.value=t.message,U.value=t.type,J.value=!1)}catch(s){console.error(s)}};s({onSubmit:B});const G=()=>{M.value=""},Q=Array.isArray(P)?P.length>1:Object.keys(P).length>1;return(t,s)=>(r(),n(b,null,[u("div",e,[u("form",{id:"stw-admin-tab-settings",method:"post",onSubmit:o(B,["prevent"])},[c(p(V),null,{default:d((()=>[p(Q)?(r(),n("div",A,[c(p(S),{class:"stwlite-tw-flex stwlite-tw-space-x-1 stwlite-tw-flex-1 stwlite-tw-rounded-md stwlite-tw-bg-white stwlite-tw-px-6 stwlite-tw-pt-6 stwlite-tw-shadow-sm stwlite-tw-border stwlite-tw-border-gray-200 stwlite-tw-border-solid"},{default:d((()=>[(r(!0),n(b,null,g(p(P),((t,e)=>(r(),y(p(C),{modelValue:K.value,"onUpdate:modelValue":s[0]||(s[0]=t=>K.value=t),as:"template",key:e},{default:d((({selected:s})=>[u("button",{onClick:t=>{return s=e.toString(),x("tab",s),void x("tab-child","");var s},class:v(["stwlite-tw-px-8 stwlite-tw-py-2.5 stwlite-tw-text-sm stwlite-tw-font-medium stwlite-tw-border-0 stwlite-tw-cursor-pointer stwlite-tw-bg-transparent focus:stwlite-tw-outline-none",s?"stwlite-tw-text-blue-700 stwlite-tw-border-b-2 stwlite-tw-border-blue-700":"stwlite-tw-border-b-2 stwlite-tw-border-transparent"])},m(t.label),11,F)])),_:2},1032,["modelValue"])))),128))])),_:1})])):f("",!0),c(p(N),{class:v(["stwlite-tw-mt-2",p(Q)?"":"stwlite-tw-pt-8"])},{default:d((()=>[(r(!0),n(b,null,g(p(P),((t,e)=>(r(),y(p(T),{key:e,class:v(["stwlite-tw-rounded-xl stwlite-tw-p-3","stwlite-tw-ring-white/60 stwlite-tw-ring-offset-2 stwlite-tw-ring-offset-blue-400"])},{default:d((()=>[c(k,{"parent-tab":e.toString(),"parent-data":t.child,onFieldData:z},null,8,["parent-tab","parent-data"])])),_:2},1024)))),128))])),_:1},8,["class"])])),_:1})],32)]),M.value?(r(),y(O,{key:0,message:M.value,type:U.value,messageTitle:q.value,onCloseNotification:G},null,8,["message","type","messageTitle"])):f("",!0)],64))}}))}}}));
