var F=Object.defineProperty;var I=t=>{throw TypeError(t)};var G=(t,e,a)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var S=(t,e,a)=>G(t,typeof e!="symbol"?e+"":e,a),H=(t,e,a)=>e.has(t)||I("Cannot "+a);var A=(t,e,a)=>(H(t,e,"read from private field"),a?a.call(t):e.get(t)),N=(t,e,a)=>e.has(t)?I("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a);import{c as x,a as c,t as P,b as J,s as O}from"./Bd4FQpE7.js";import{m as h,k as u,p as L,f as _,a as R,c as g,x as D,r as b,t as k,s as j,A as K}from"./Bj8SChEI.js";import{h as M,j as Q,k as B,s as y,a as U,m as V,l as W,f as X,C as Y}from"./BAITReer.js";import{p,i as q,r as T,d as z,e as Z}from"./ZhKyHBKW.js";const $="data-label-root";var w;class ee{constructor(e){S(this,"opts");N(this,w,h(()=>({id:this.opts.id.current,[$]:"",onmousedown:this.onmousedown})));this.opts=e,this.onmousedown=this.onmousedown.bind(this),M(e)}onmousedown(e){e.detail>1&&e.preventDefault()}get props(){return u(A(this,w))}}w=new WeakMap;function te(t){return new ee(t)}var ae=P("<label><!></label>");function se(t,e){L(e,!0);let a=p(e,"id",19,Q),n=p(e,"ref",15,null),o=T(e,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const f=te({id:B.with(()=>a()),ref:B.with(()=>n(),s=>n(s))}),l=h(()=>V(o,f.props,{for:e.for}));var i=x(),v=_(i);{var m=s=>{var r=x(),d=_(r);y(d,()=>e.child,()=>({props:u(l)})),c(s,r)},C=s=>{var r=ae();let d;var E=g(r);y(E,()=>e.children??D),b(r),k(()=>d=U(r,d,{...u(l),for:e.for})),c(s,r)};q(v,s=>{e.child?s(m):s(C,!1)})}c(t,i),R()}function ue(t,e){L(e,!0);let a=T(e,["$$slots","$$events","$$legacy"]);W(t,z({name:"chevron-down"},()=>a,{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(o,f)=>{var l=x(),i=_(l);y(i,()=>e.children??D),c(o,l)},$$slots:{default:!0}})),R()}function re(t,e){L(e,!0);let a=p(e,"ref",15,null),n=T(e,["$$slots","$$events","$$legacy","ref","class"]);var o=x(),f=_(o);const l=h(()=>X("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class));Z(f,()=>se,(i,v)=>{v(i,z({get class(){return u(l)}},()=>n,{get ref(){return a()},set ref(m){a(m)}}))}),c(t,o),R()}var oe=P('<div class="text-xs text-muted-foreground"> </div>'),ne=P('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function ve(t,e){const a=p(e,"isChecked",3,!1);var n=ne(),o=g(n),f=g(o);const l=h(()=>`${e.name}-label`);Y(f,{get id(){return e.name},get"aria-labelledby"(){return u(l)},get checked(){return a()},get onCheckedChange(){return e.onCheckedChange}});var i=j(f,2);const v=h(()=>`${e.name}-label`);re(i,{get id(){return u(v)},get for(){return e.name},class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:(s,r)=>{K();var d=J();k(()=>O(d,e.label)),c(s,d)},$$slots:{default:!0}}),b(o);var m=j(o,2);{var C=s=>{var r=oe(),d=g(r,!0);b(r),k(()=>O(d,e.helperText)),c(s,r)};q(m,s=>{e.helperText&&s(C)})}b(n),c(t,n)}export{ue as C,re as L,ve as a};
