import { z } from "zod/v4";
import type { JSX } from "solid-js";
import type { ComponentMeta } from "../../meta";
export const TogglePropsSchema = z.object({
  pressed: z.boolean().optional().describe("Controlled pressed state. When provided, the component is in controlled mode."),
  defaultPressed: z.boolean().optional().describe("Default pressed state for uncontrolled usage. Defaults to false."),
  disabled: z.boolean().optional().describe("When true, disables the toggle and prevents state changes."),
});
export interface ToggleProps extends z.infer<typeof TogglePropsSchema>, Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, keyof z.infer<typeof TogglePropsSchema>> { onPressedChange?: (pressed: boolean) => void; children?: JSX.Element; }
export const ToggleMeta: ComponentMeta = {
  name: "Toggle",
  description: "Two-state button that can be toggled on or off",
  parts: ["Toggle"] as const,
  requiredParts: ["Toggle"] as const,
} as const;
