/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import _ from 'lodash';
export declare const CALENDAR_POPUP_ACTION_KEYS: readonly ["quickCreateAction", "eventViewAction"];
export type CalendarPopupActionKey = (typeof CALENDAR_POPUP_ACTION_KEYS)[number];
export declare const CALENDAR_POPUP_PROP_KEYS: readonly ["quickCreatePopupSettings", "eventPopupSettings"];
export type HiddenPopupOpenViewNormalizer = (actionName: string, value: any, options: {
    transaction?: any;
    popupTemplateHostUid?: string;
    popupActionContext?: {
        hasCurrentRecord?: boolean;
    };
}) => Promise<Record<string, any> | undefined> | Record<string, any> | undefined;
export type HiddenPopupTemplateOpenViewBuilder = (input: {
    actionName: string;
    actionUid: string;
    openView: Record<string, any>;
    popupSettings?: Record<string, any>;
    existingHost?: any;
    transaction?: any;
    hasCurrentRecord?: boolean;
    normalizePopupSettings: (popupSettings?: Record<string, any>) => Record<string, any>;
    mergeDisplaySettings: (openView: Record<string, any>, popupSettings?: Record<string, any>, fallbackOpenView?: Record<string, any> | null) => Record<string, any>;
}) => Promise<Record<string, any>> | Record<string, any>;
export type HiddenPopupHostDefaultContentEnsurer = (input: {
    actionName: string;
    actionUid: string;
    popupSettings?: Record<string, any>;
    transaction?: any;
    hasCurrentRecord?: boolean;
    mergeDisplaySettings: (openView: Record<string, any>, popupSettings?: Record<string, any>, fallbackOpenView?: Record<string, any> | null) => Record<string, any>;
}) => Promise<boolean> | boolean;
export type HiddenPopupHostRuntime = {
    repository: {
        findModelById: (uid: string, options?: any) => Promise<any>;
        patch: (payload: Record<string, any>, options?: any) => Promise<any>;
        upsertModel: (payload: Record<string, any>, options?: any) => Promise<any>;
    };
    applyPopupHostLocalContent?: (input: {
        actionName: string;
        actionUid: string;
        popupSettings?: Record<string, any>;
        transaction?: any;
        hasCurrentRecord?: boolean;
    }) => Promise<any> | any;
    buildPopupOpenViewWithTemplate: HiddenPopupTemplateOpenViewBuilder;
    clearFlowTemplateUsagesForNodeTree: (uid: string, transaction?: any) => Promise<any>;
    ensurePopupHostDefaultContent: HiddenPopupHostDefaultContentEnsurer;
    reconcilePopupOpenViewTransition: (uid: string, currentOpenView: Record<string, any> | null | undefined, nextOpenView: Record<string, any>, transaction?: any) => Promise<any>;
    removeNodeTreeWithBindings: (uid: string, transaction?: any) => Promise<any>;
    syncFlowTemplateUsagesForNodeTree: (uid: string, transaction?: any) => Promise<any>;
};
export declare function normalizeCalendarPopupSettings(actionKey: CalendarPopupActionKey, popupSettings?: Record<string, any>): Record<string, any>;
export declare function getCalendarPopupActionUse(actionKey: CalendarPopupActionKey): "CalendarQuickCreateActionModel" | "CalendarEventViewActionModel";
export declare function getCalendarPopupPropKey(actionKey: CalendarPopupActionKey): "quickCreatePopupSettings" | "eventPopupSettings";
export declare function getCalendarPopupActionUid(calendarUid: string, actionKey: CalendarPopupActionKey): string;
export declare function getCalendarBlockResourceInit(blockNode: any): any;
export declare function getCalendarPopupStoredSettings(blockNode: any, actionKey: CalendarPopupActionKey): Record<string, any>;
export declare function replaceCalendarStoredPopupSettings(runtime: Pick<HiddenPopupHostRuntime, 'repository'>, blockNode: any, actionKey: CalendarPopupActionKey, popupSettings: Record<string, any>, transaction?: any): Promise<void>;
export declare function buildCalendarInitialStepParams(input: {
    stepParams?: Record<string, any>;
    props?: Record<string, any>;
    settings?: Record<string, any>;
}): Record<string, any>;
export declare function buildCalendarPopupOpenView(input: {
    blockNode: any;
    actionKey: CalendarPopupActionKey;
    resourceInit?: Record<string, any>;
    popupSettings?: Record<string, any>;
}): _.Dictionary<any>;
export declare function mergeCalendarPopupSettings(actionKey: CalendarPopupActionKey, current: any, value: any): Record<string, any>;
export declare function stripCalendarPopupTargetSettingsForResourceChange(actionKey: CalendarPopupActionKey, popupSettings?: Record<string, any>): Record<string, any>;
export declare function normalizeCalendarPopupConfigureValue(input: {
    actionName: string;
    blockUid: string;
    actionKey: CalendarPopupActionKey;
    value: any;
    transaction?: any;
    normalizeOpenView: HiddenPopupOpenViewNormalizer;
}): Promise<Record<string, any>>;
export declare function normalizeCalendarInlineSettingsForConfigure(settings?: Record<string, any>): Record<string, any>;
export declare function resolveCalendarInitialPopupOverride(settings: Record<string, any> | undefined, primaryKey: 'quickCreatePopup' | 'eventPopup', legacyKey: 'quickCreatePopupSettings' | 'eventPopupSettings'): any;
export declare function ensureCalendarBlockPopupHosts(runtime: HiddenPopupHostRuntime, blockNode: any, transaction?: any, popupSettingsOverrides?: Partial<Record<CalendarPopupActionKey, Record<string, any> | undefined>>, options?: {
    displayFallbackOpenViews?: Partial<Record<CalendarPopupActionKey, Record<string, any> | undefined>>;
}): Promise<any>;
export declare function projectCalendarBlockPopupHosts<T = any>(node: T): T;
export declare function projectCalendarBlockPopupHostsInTree<T = any>(node: T): T;
