import{S as w,i as C,s as I,j as N,b as g,h as k,M as j,e as m,k as y,a as h,f as _,J as q,K as x,L as z,u as A,v as B,m as D,I as E,z as J,W as K,N as L,Y as M,d as T,l as W,n as Y}from"./index.9fc31042.js";function v(r,e,c){const o=r.slice();return o[9]=e[c],o[11]=c,o}function F(r){let e,c=r[9].name+"",o,n,t,s;function d(){return r[7](r[9])}return{c(){e=m("button"),o=T(c),n=y(),h(e,"class","px-4 pb-2 pt-1.5 border-transparent text-gray-400 hover:text-gray-700 -mb-[2px] border-2 border-b-0")},m(a,l){g(a,e,l),_(e,o),_(e,n),t||(s=W(e,"click",d),t=!0)},p(a,l){r=a},d(a){a&&k(e),t=!1,s()}}}function G(r){let e,c=r[9].name+"",o,n;return{c(){e=m("button"),o=T(c),n=y(),h(e,"class","bg-white px-4 pb-2 pt-1.5 rounded-t-lg border-gray-200 -mb-[2px] border-2 border-b-0")},m(t,s){g(t,e,s),_(e,o),_(e,n)},p:Y,d(t){t&&k(e)}}}function S(r){let e;function c(t,s){return t[9].id===t[0]?G:F}let o=c(r),n=o(r);return{c(){n.c(),e=N()},m(t,s){n.m(t,s),g(t,e,s)},p(t,s){o===(o=c(t))&&n?n.p(t,s):(n.d(1),n=o(t),n&&(n.c(),n.m(e.parentNode,e)))},d(t){n.d(t),t&&k(e)}}}function H(r){let e,c,o,n,t=r[1],s=[];for(let l=0;l<t.length;l+=1)s[l]=S(v(r,t,l));const d=r[6].default,a=j(d,r,r[5],null);return{c(){e=m("div"),c=m("div");for(let l=0;l<s.length;l+=1)s[l].c();o=y(),a&&a.c(),h(c,"class","flex border-b-2"),h(e,"class","flex flex-col my-4")},m(l,f){g(l,e,f),_(e,c);for(let u=0;u<s.length;u+=1)s[u].m(c,null);_(e,o),a&&a.m(e,null),n=!0},p(l,[f]){if(f&11){t=l[1];let u;for(u=0;u<t.length;u+=1){const i=v(l,t,u);s[u]?s[u].p(i,f):(s[u]=S(i),s[u].c(),s[u].m(c,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=t.length}a&&a.p&&(!n||f&32)&&q(a,d,l,l[5],n?z(d,l[5],f,null):x(l[5]),null)},i(l){n||(A(a,l),n=!0)},o(l){B(a,l),n=!1},d(l){l&&k(e),D(s,l),a&&a.d(l)}}}const O={};function P(r,e,c){let o,{$$slots:n={},$$scope:t}=e,{style:s=""}=e;const d=[],a=L(!1);E(r,a,i=>c(0,o=i));const l=J();K(O,{register_tab:i=>{d.push({name:i.name,id:i.id}),a.update(b=>b||i.id)},unregister_tab:i=>{const b=d.findIndex(p=>p.id===i.id);d.splice(b,1),a.update(p=>p===i.id?d[b].id||d[d.length-1].id:p)},selected_tab:a});function f(i){M(a,o=i,o),l("change")}const u=i=>f(i.id);return r.$$set=i=>{"style"in i&&c(4,s=i.style),"$$scope"in i&&c(5,t=i.$$scope)},[o,d,a,f,s,t,n,u]}class R extends w{constructor(e){super(),C(this,e,P,H,I,{style:4})}}export{R as T,O as a};
