import{B as e,E as t,H as n,It as r,Mt as i,Q as a,V as o,W as s,Y as c,Z as l,_t as u,at as d,d as f,ft as p,ht as m,jt as h,mt as g,ot as _,pt as v,s as y,st as b,t as x,x as S,yt as C}from"./BA99CCI5.js";import"./xihTtKlq.js";import"./DGo8yE5j.js";import{t as w}from"./BB59mDRy.js";import{t as T}from"./CmTUQ0et.js";import{t as E}from"./B66v-P2b.js";import{t as D}from"./CfTYE2PK2.js";import{t as O}from"./DGICnufN.js";var ee=s(`<span class="min-w-0"> </span>`),te=s(`<p class="text-sm leading-6 text-neutral-700 dark:text-neutral-300"> </p>`),k=s(`<div role="switch"><div class="flex min-w-0 items-center gap-2"><!> <!></div> <!></div> <!>`,1);function A(s,A){i(A,!1);let j=m(),M=m(),N=m(),P=y(A,`checked`,12,!1),F=y(A,`disabled`,8,!1),I=y(A,`label`,8,``),L=y(A,`ariaLabel`,8,`Toggle`),R=y(A,`color`,8,`accent`),z=y(A,`icon`,8,w),B=y(A,`checkboxColor`,8,``),V=y(A,`shape`,8,`circle`),H=y(A,`variant`,8,`filled`),U=y(A,`iconColor`,8,``),W=y(A,`fullWidth`,8,!1),G=y(A,`infoHeader`,8,``),K=y(A,`infoBody`,8,``),q=x(),J=m(!1);function Y(){F()||(P(!P()),q(`checked`,P()),q(`change`,P()))}function ne(e){e.stopPropagation(),u(J,!0)}d(()=>(l(I()),l(L())),()=>{u(j,I()||L())}),d(()=>(l(B()),l(R())),()=>{u(M,B()?B():R()===`amber`?`#F59E0B`:R())}),d(()=>(l(G()),l(K())),()=>{u(N,G().trim()!==``||K().trim()!==``)}),_(),f();var X=k(),Z=v(X),Q=p(Z),$=p(Q),re=e=>{var t=ee(),i=p(t,!0);r(t),b(()=>o(i,I())),n(e,t)};e($,e=>{I()&&e(re)});var ie=g($,2),ae=e=>{E(e,{get icon(){return T},variant:`secondary`,size:`xs`,get ariaLabel(){return`More information about ${a(j)??``}`},$$events:{click:ne}})};e(ie,e=>{a(N)&&e(ae)}),r(Q);var oe=g(Q,2);{let e=C(()=>a(M)||`accent`);D(oe,{get checked(){return P()},get icon(){return z()},get color(){return a(e)},get shape(){return V()},get variant(){return H()},get iconColor(){return U()},get disabled(){return F()},stopPropagation:!0,$$events:{click:Y}})}r(Z);var se=g(Z,2),ce=e=>{{let t=C(()=>G()||a(j));O(e,{get header(){return a(t)},get open(){return a(J)},set open(e){u(J,e)},children:(e,t)=>{var i=te(),a=p(i,!0);r(i),b(()=>o(a,K())),n(e,i)},$$slots:{default:!0},$$legacy:!0})}};e(se,e=>{a(N)&&e(ce)}),b(()=>{S(Z,`aria-checked`,P()),S(Z,`aria-label`,a(j)),S(Z,`aria-disabled`,F()),S(Z,`tabindex`,F()?void 0:0),t(Z,1,`flex ${W()?`w-full justify-between`:`w-fit`} items-center gap-3 rounded-xl border border-neutral-300 bg-white px-3 py-2 text-sm text-neutral-700 transition-colors dark:border-neutral-700/60 dark:bg-neutral-800/50 dark:text-neutral-200 ${F()?`cursor-not-allowed opacity-50`:`cursor-pointer hover:bg-neutral-50 dark:hover:bg-neutral-800`}`)}),c(`click`,Z,Y),c(`keydown`,Z,e=>{F()||(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Y())}),n(s,X),h()}export{A as t};