"use client"
import{b as l}from"./chunk-WAKFRGRJ.mjs";import{i as o}from"./chunk-NSW4D7UO.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:n,trackDimensions:d,thumbDimensions:h,thumbTranslate:r,checked:u=!0,loading:i=!1,disabled:a=!1,disabledTooltip:s}){let c=e(t.Root,{checked:i?!1:u,name:"switch",...n&&{onCheckedChange:n},disabled:a||i,className:o("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",(a||i)&&"cursor-not-allowed",d),children:e(t.Thumb,{className:o(`radix-state-checked:${r}`,"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,r)})});return s?e(l,{content:s,children:e("div",{children:c})}):c}export{f as a};
