import { type SupportedLanguages } from '@payloadcms/translations';
import type { SanitizedDocumentPermissions } from '../../auth/types.js';
import type { Field, Validate } from '../../fields/config/types.js';
import type { TypedLocale } from '../../index.js';
import type { DocumentPreferences } from '../../preferences/types.js';
import type { PayloadRequest, Where } from '../../types/index.js';
export type Data = {
    [key: string]: any;
};
export type Row = {
    blockType?: string;
    collapsed?: boolean;
    id: string;
};
export type FilterOptionsResult = {
    [relation: string]: boolean | Where;
};
export type FieldState = {
    customComponents?: {
        /**
         * This is used by UI fields, as they can have arbitrary components defined if used
         * as a vessel to bring in custom components.
         */
        [key: string]: React.ReactNode | React.ReactNode[] | undefined;
        AfterInput?: React.ReactNode;
        BeforeInput?: React.ReactNode;
        Description?: React.ReactNode;
        Error?: React.ReactNode;
        Field?: React.ReactNode;
        Label?: React.ReactNode;
        RowLabels?: React.ReactNode[];
    };
    disableFormData?: boolean;
    errorMessage?: string;
    errorPaths?: string[];
    /**
     * The fieldSchema may be part of the form state if `includeSchema: true` is passed to buildFormState.
     * This will never be in the form state of the client.
     */
    fieldSchema?: Field;
    filterOptions?: FilterOptionsResult;
    initialValue: unknown;
    isSidebar?: boolean;
    passesCondition?: boolean;
    requiresRender?: boolean;
    rows?: Row[];
    valid: boolean;
    validate?: Validate;
    value: unknown;
};
export type FieldStateWithoutComponents = Omit<FieldState, 'customComponents'>;
export type FormState = {
    [path: string]: FieldState;
};
export type FormStateWithoutComponents = {
    [path: string]: FieldStateWithoutComponents;
};
export type BuildFormStateArgs = {
    data?: Data;
    docPermissions: SanitizedDocumentPermissions | undefined;
    docPreferences: DocumentPreferences;
    fallbackLocale?: false | TypedLocale;
    formState?: FormState;
    id?: number | string;
    language?: keyof SupportedLanguages;
    locale?: string;
    operation?: 'create' | 'update';
    renderAllFields?: boolean;
    req: PayloadRequest;
    returnLockStatus?: boolean;
    schemaPath: string;
    updateLastEdited?: boolean;
} & ({
    collectionSlug: string;
    globalSlug?: string;
} | {
    collectionSlug?: string;
    globalSlug: string;
});
//# sourceMappingURL=Form.d.ts.map