import type { FieldOptionConstraints, Severity, ValidationIssue } from "../types.js"; /** * Known field options that can be validated. * * @beta */ export type FieldOption = "label" | "placeholder" | "required" | "minValue" | "maxValue" | "minItems" | "maxItems"; /** * Context for field option validation. * * @beta */ export interface FieldOptionsContext { /** The field name */ fieldName: string; /** Which options are present on this field */ presentOptions: FieldOption[]; /** Path to this field */ path?: string; } /** * Validates field options against constraints. * * @param context - Information about the field and its options * @param constraints - Field option constraints * @returns Array of validation issues (empty if valid) * * @beta */ export declare function validateFieldOptions(context: FieldOptionsContext, constraints: FieldOptionConstraints): ValidationIssue[]; /** * Extracts which options are present on a field object. * Works with FormSpec field types. * * @param field - A field object with potential options * @returns Array of present option names * * @beta */ export declare function extractFieldOptions(field: Record): FieldOption[]; /** * Checks if a specific field option is allowed. * * @param option - The option to check * @param constraints - Field option constraints * @returns true if allowed, false if disallowed * * @beta */ export declare function isFieldOptionAllowed(option: FieldOption, constraints: FieldOptionConstraints): boolean; /** * Gets the severity level for a field option. * * @param option - The option to check * @param constraints - Field option constraints * @returns Severity level, or "off" if not constrained * * @beta */ export declare function getFieldOptionSeverity(option: FieldOption, constraints: FieldOptionConstraints): Severity; //# sourceMappingURL=field-options.d.ts.map