import { FieldValues, FieldPath, UseFormReturn } from 'react-hook-form';

interface TabDefinition<T extends FieldValues = FieldValues> {
    /** Unique tab identifier, used as ProgressTabs value */
    id: string;
    /** i18n key for the tab label (used when `label` is not provided) */
    labelKey: string;
    /** Raw label string (overrides `labelKey`) */
    label?: string;
    /** Fields validated when navigating forward from this tab. If omitted, full form validation is used. */
    validationFields?: FieldPath<T>[];
    /** Predicate to conditionally show/hide this tab at runtime */
    isVisible?: (form: UseFormReturn<T>) => boolean;
}

export type { TabDefinition as T };
