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