import"./DsnmJJEf.js";import{p as h,a as n,b as _,r as l,c,d as k,g as e,s as f,t as y}from"./qex-fw8l.js";import{d as E,s as T,a as w}from"./vzbhwc8t.js";import{i as v}from"./BnUrxEZg.js";import{e as I}from"./HL7kq492.js";import{s as j}from"./CoLYeqRS.js";import{E as q}from"./DPHzOARe.js";var z=c('<span class="absolute inset-x-0 -bottom-px h-0.5 bg-primary"></span>'),A=c("<button><!> <!></button>"),B=c('<div class="flex border-b border-border"></div>');function L(b,r){h(r,!0);var s=B();I(s,21,()=>r.items,i=>i.id,(i,a)=>{var o=A(),d=k(o);{var p=t=>{q(t,{get icon(){return e(a).icon},class:"me-1.5 h-4 w-4 shrink-0 text-sm"})};v(d,t=>{e(a).icon&&t(p)})}var m=f(d),x=f(m);{var u=t=>{var g=z();n(t,g)};v(x,t=>{r.active===e(a).id&&t(u)})}l(o),y(()=>{j(o,1,`relative inline-flex items-center px-4 py-2.5 text-sm font-medium transition-colors
				${r.active===e(a).id?"text-primary":"text-muted-foreground hover:text-foreground"}`),T(m,` ${e(a).label??""} `)}),w("click",o,()=>r.onchange(e(a).id)),n(i,o)}),l(s),n(b,s),_()}E(["click"]);export{L as T};
