"use client"; import { useState } from "react"; import type { ComponentRenderProps } from "./types"; import { baseClass, getCustomClass } from "./utils"; export function Switch({ element }: ComponentRenderProps) { const { props } = element; const customClass = getCustomClass(props); const [checked, setChecked] = useState(!!props.checked); return (