import { z } from "zod/v4";
import type { JSX } from "solid-js";
import type { ComponentMeta } from "../../meta";
export const NumberFieldRootPropsSchema = z.object({
  value: z.number().optional().describe("Controlled numeric value"),
  defaultValue: z.number().optional().describe("Initial value (uncontrolled). Defaults to 0"),
  min: z.number().optional().describe("Minimum allowed value"),
  max: z.number().optional().describe("Maximum allowed value"),
  step: z.number().optional().describe("Step amount for increment/decrement. Defaults to 1"),
  disabled: z.boolean().optional().describe("Whether the number field is disabled"),
  required: z.boolean().optional().describe("Whether the field is required for form submission"),
});
export interface NumberFieldRootProps extends z.infer<typeof NumberFieldRootPropsSchema> { onValueChange?: (value: number) => void; children: JSX.Element; }
export const NumberFieldMeta: ComponentMeta = {
  name: "NumberField", description: "Numeric input with increment/decrement buttons and keyboard support",
  parts: ["Root", "Input", "IncrementTrigger", "DecrementTrigger", "Label", "Description", "ErrorMessage"] as const, requiredParts: ["Root", "Input"] as const,
} as const;
