"use client"
import{b as l}from"./chunk-25MRWMFJ.mjs";import{m as n}from"./chunk-VCTQS6IH.mjs";import*as i from"@radix-ui/react-switch";import{useMemo as f}from"react";import{jsx as t}from"react/jsx-runtime";function x({fn:r,id:d,trackDimensions:u,thumbDimensions:h,thumbTranslate:s,checked:m=!0,loading:o=!1,disabled:a=!1,disabledTooltip:e}){let b=f(()=>e?!0:a||o,[e,a,o]),c=t(i.Root,{checked:o?!1:m,name:"switch",id:d,...r&&{onCheckedChange:r},disabled:b,className:n("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",u),children:t(i.Thumb,{className:n(`radix-state-checked:${s}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",h,s)})});return e?t(l,{content:e,children:t("div",{children:c})}):c}export{x as a};
