import type { ToastConfig } from '@wix/bex-core';
import type { Field, SchemaConfig } from '../../types/SchemaConfig';
import type { FieldProperties, FieldPropertiesState, FieldRules, SelectableFieldTypes, ValidationRule } from './types';
export interface CmsFormStateParams {
    schemaConfig: SchemaConfig;
    getValidationRules: (t: SelectableFieldTypes) => ValidationRule[];
    mode?: 'new' | 'edit';
    editingFieldId?: string;
}
export declare class CmsFormState {
    readonly schemaConfig: SchemaConfig;
    readonly getValidationRules: (t: SelectableFieldTypes) => ValidationRule[];
    properties: FieldPropertiesState;
    fieldRules: FieldRules;
    mode: 'new' | 'edit';
    editingFieldId: string | undefined;
    touchedFields: Set<keyof FieldProperties>;
    showValidationError: boolean;
    errorToastConfig: ToastConfig | undefined;
    constructor(params: CmsFormStateParams);
    get fieldTypeError(): string | undefined;
    get nameError(): string | undefined;
    get hasInvalidFields(): boolean;
    get visibleErrors(): {
        type: string | undefined;
        name: string | undefined;
    };
    get supportedValidationRules(): ValidationRule[];
    get validationErrorMessage(): string;
    setProperty<K extends keyof FieldPropertiesState>(key: K, value: FieldPropertiesState[K]): void;
    setValidationRule(rule: ValidationRule, value: unknown): void;
    blurField(field: keyof FieldProperties): void;
    enableShowValidationError(): void;
    setMode(mode: 'new' | 'edit'): void;
    setErrorToastConfig(cfg: ToastConfig | undefined): void;
    reset(): void;
    hideValidationError(): void;
    changeType(v: SelectableFieldTypes): void;
    changeName(v: string): void;
    setIsPii(v: boolean): void;
    setHelpText(v: string): void;
    loadField(field: Field): void;
    private _onTypeChange;
}
//# sourceMappingURL=CmsFormState.d.ts.map