import type React from "react"; import type { FieldLabel } from "src/primitives/Field"; import type { IconLike } from "src/utils/withIconSize"; export interface EmailValue { /** Display text for the email chip. */ label: string; /** The email address string. */ value: string; /** Whether the email passes regex validation. */ valid: boolean; } export interface MultiEmailInputProps { /** Text displayed above the input. */ label?: string; /** Placeholder text when no emails are added. */ placeholder?: string; /** Help text displayed below the input. */ helpText?: React.ReactNode; /** Error message displayed below the input. */ error?: string; /** Controlled email values. */ value?: EmailValue[]; /** Callback fired when emails change. */ onChange?: (emails: EmailValue[]) => void; /** Callback fired on blur when input is empty. */ onBlur?: () => void; /** Disable the input. */ disabled?: boolean; /** Mark as required (shows asterisk). */ required?: boolean; /** Max height in pixels before the chip area scrolls. @default 200 */ maxHeight?: number; /** Number of chips visible when blurred. @default 3 */ visibleEmailsCount?: number; /** Show email counter next to label. */ counter?: boolean | { label?: string; startsFrom?: number; }; /** Show a link to remove invalid emails alongside the error. */ filterInvalidEmails?: { label?: string; }; /** Never collapse chips, even when blurred. @default false */ isAlwaysExpanded?: boolean; /** Content rendered before the chips. Accepts an element, a component * reference, or any other React node. */ prefix?: IconLike; /** Content rendered after the chips. Accepts an element, a component * reference, or any other React node. */ suffix?: IconLike; /** Props forwarded to the FieldLabel. */ labelProps?: Omit, "htmlFor" | "children">; /** Additional CSS class names for the outermost wrapper. */ className?: string; }