import { CustomField, CustomFieldOwner, DataExtensionField, DataExtensionSchemaService, ReportBI } from '../services';
import { TaskState } from './TaskState';
import { Fqdn } from '../model';
import { WixPatternsContainer } from './WixPatternsContainer';
import { CustomFieldForm } from './CustomFieldModalState';
import type { DataExtensionSchema } from '@wix/bex-utils/@wix/ambassador-data-extensions-v1-data-extension-schema/types';
import { ConditionalModalState } from './ConditionalModalState';
import { DeleteFieldModalState } from './DeleteFieldModalState';
export interface DataExtensionStateParams {
    container: WixPatternsContainer;
    closeSidePanel?: () => unknown;
    fqdn: Fqdn;
}
export interface DefaultPermissionsConfig {
    installedApps?: {
        hide?: boolean;
        defaultRead?: boolean;
        defaultWrite?: boolean;
    };
    siteVisitors?: {
        hide?: boolean;
        defaultRead?: boolean;
        defaultWrite?: boolean;
    };
}
export interface DataExtensionOverrides {
    disableUserDefinedWriting?: boolean;
    containsPii?: boolean;
    filterable?: boolean;
    /**
     * When set to true, will disable "Manage custom fields" action in the page actions menu.
     */
    disableDefaultPageAction?: boolean;
    extensionPoint?: string;
    defaultPermissions?: DefaultPermissionsConfig;
    /**
     * When set to true, will enable the "Archived Fields" button in the custom columns panel.
     */
    enableArchive?: boolean;
}
export declare const MAX_CUSTOM_FIELDS = 50;
/**
 * Manages data extension schemas and custom fields for a collection
 */
export declare class DataExtensionState {
    readonly dataExtensionService: DataExtensionSchemaService;
    readonly initTask: TaskState<unknown>;
    readonly container: WixPatternsContainer;
    _hasWritePermissions?: boolean;
    readonly closeSidePanel: (() => unknown) | undefined;
    readonly fqdn: Fqdn;
    get fqdnString(): string;
    get isFqdnValid(): boolean;
    _dataExtensionSchemasBase: DataExtensionSchema[];
    containsPii?: boolean;
    defaultPermissions?: DefaultPermissionsConfig;
    readonly disableUserDefinedWriting: boolean | undefined;
    readonly filterable: boolean | undefined;
    readonly enableArchive?: boolean;
    isArchivedPanelOpen: boolean;
    private _fieldOperationsService?;
    private _fieldOperationsServicePromise?;
    readonly deleteConfirmModal: ConditionalModalState<{
        id: string;
        origin: string;
    }>;
    deleteFieldModal?: DeleteFieldModalState;
    _extensionPoint: string | undefined;
    constructor(params: Readonly<DataExtensionStateParams & DataExtensionOverrides>);
    get hasWritePermissions(): boolean;
    get disableAddCustomField(): boolean;
    get disableAddCustomFieldContent(): string;
    getArchiveSuccessToastMessage(fieldName?: string): string;
    getArchiveSuccessToastAction(): {
        text: string;
        uiType: "LINK";
        onClick: () => void;
    } | undefined;
    /**
     * Lazily loads the field operations service to reduce bundle size.
     * Only loads when archive/restore/delete operations are needed.
     */
    private getFieldOperationsService;
    archiveField({ id, origin, reportBi, }: {
        id?: string;
        origin: string;
        reportBi: ReportBI;
    }): Promise<void>;
    restoreField({ id, origin, reportBi, }: {
        id?: string;
        origin: string;
        reportBi: ReportBI;
    }): Promise<void>;
    deleteField({ id, origin, reportBi, }: {
        id?: string;
        origin: string;
        reportBi: ReportBI;
    }): Promise<void>;
    extractFieldValuesFromSchema(fieldId: string): CustomFieldForm | undefined;
    _toCustomField({ key, schema, editable, owner, namespace, }: {
        key: string;
        schema: DataExtensionField;
        editable: boolean;
        owner: CustomFieldOwner;
        namespace: string;
    }): CustomField | undefined;
    private isSupportedFieldType;
    private getAvailableCustomFieldsInSchema;
    /**
     * Available custom fields, excluding archived fields
     */
    get availableUserCustomFields(): CustomField[];
    get availableAppsCustomFields(): CustomField[];
    getSchemaAndFieldsByNamespace(namespace: string): {
        schema?: undefined;
        fields?: undefined;
    } | {
        schema: DataExtensionSchema;
        fields: CustomField[];
    };
    getAvailableCustomFieldsForApp(appSchema: DataExtensionSchema): CustomField[];
    get availableCustomFields(): CustomField[];
    get allUserCustomFields(): CustomField[];
    get allAppsCustomFields(): CustomField[];
    get allCustomFields(): CustomField[];
    get archivedItems(): any[];
    get shouldDisplayArchive(): boolean | undefined;
    get filterableCustomFields(): CustomField[];
    get isReachedMaxCustomFields(): boolean;
    get allNamespaces(): string[];
    init(): () => void;
    _upsertSchema(newSchema: DataExtensionSchema): void;
    get userSchema(): DataExtensionSchema | undefined;
    get _dataExtensionSchemas(): DataExtensionSchema[];
    get appSchemas(): DataExtensionSchema[];
    fetchSchemas(): Promise<void>;
    openArchivedPanel(): void;
    closeArchivedPanel(): void;
    openDeleteConfirmModal({ id, origin }: {
        id: string;
        origin: string;
    }): void;
}
//# sourceMappingURL=DataExtensionState.d.ts.map