import"./DsnmJJEf.js";import{b as w,G as y,p as k,f as T,m as I,s as i,c as o,r as d,t as B,h as E,a as F}from"./DaF1Dxyz.js";import{s as G}from"./DP6lo9Eo.js";import{r as L,s as h,a as n,c as f}from"./IFJnBvGa.js";import{i as U,k as j}from"./CWmDRfqq.js";import{p as c}from"./qWzGFQ66.js";function q(m,e){e.onUpdate?.()}var z=T('<!> <div class="relative mb-2"><input class="absolute inset-y-0 w-12 appearance-none" type="checkbox" role="switch"/> <label><div><div></div></div> </label></div>',1);function M(m,e){const l=y();k(e,!0);let t=c(e,"value",15),u=c(e,"texts",19,()=>["on","off"]),v=c(e,"disabled",3,!1);var b=z(),p=I(b);U(p,{get label(){return e.label},get formId(){return l},get helpText(){return e.helpText}});var g=i(p,2),a=o(g);L(a),a.__change=[q,e];var r=i(a,2),s=o(r),_=o(s);d(s);var x=i(s);d(r),d(g),B(()=>{h(a,"id",l),a.disabled=v(),n(r,1,f(["inline-flex",v()&&"cursor-not-allowed opacity-50"])),h(r,"for",l),n(s,1,f(["me-2 flex h-6 w-12 rounded-full px-1",t()?"bg-blue-500":"bg-gray-400 dark:bg-gray-600"])),n(_,1,f(["mt-1 h-4 w-4 rounded-full bg-white transition-transform duration-300",t()?"translate-x-6":""])),G(x,` ${(t()?u()[0]:u()[1])??""}`)}),j(a,t),E(m,b),F()}w(["change"]);export{M as T};
