import { z } from "zod/v4";
import type { JSX } from "solid-js";
import type { ComponentMeta } from "../../meta";
export const TextFieldRootPropsSchema = z.object({
  value: z.string().optional().describe("Controlled value of the text field"),
  defaultValue: z.string().optional().describe("Initial value (uncontrolled)"),
  disabled: z.boolean().optional().describe("Whether the field is disabled"),
  readOnly: z.boolean().optional().describe("Whether the field is read-only"),
  required: z.boolean().optional().describe("Whether the field is required for form submission"),
});
export interface TextFieldRootProps extends z.infer<typeof TextFieldRootPropsSchema> {
  onValueChange?: (value: string) => void;
  children: JSX.Element;
}
export const TextFieldMeta: ComponentMeta = {
  name: "TextField", description: "Text input field with label, description, and error message support",
  parts: ["Root", "Label", "Input", "TextArea", "Description", "ErrorMessage"] as const,
  requiredParts: ["Root", "Input"] as const,
} as const;
