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