/**
 * 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 { BaseRecordResource, Collection, CollectionField, DataSource, DefaultStructure, FlowModelContext, MultiRecordResource, SingleRecordResource } from '@nocobase/flow-engine';
import { DataBlockModel } from './DataBlockModel';
export interface ResourceSettingsInitParams {
    dataSourceKey: string;
    collectionName: string;
    associationName?: string;
    sourceId?: string;
    filterByTk?: string;
}
export declare class CollectionBlockModel<T = DefaultStructure> extends DataBlockModel<T> {
    isManualRefresh: boolean;
    collectionRequired: boolean;
    private previousBeforeRenderHash;
    private lastSeenDirtyVersion;
    private dirtyRefreshing;
    protected onMount(): void;
    private getDirtyTrackingVersion;
    onActive(forceRefresh?: boolean): void;
    /**
     * 子菜单过滤函数
     */
    static filterCollection(_collection: Collection): boolean;
    /**
     * 判断当前区块模型在 collection 选择菜单中是否应该展示指定数据表。
     *
     * @param collection 数据表
     * @returns 是否显示
     */
    static isCollectionAvailable(collection: Collection | undefined): boolean;
    /**
     * 定义子菜单选项
     */
    static defineChildren(ctx: FlowModelContext): Promise<any[]>;
    get dataSource(): DataSource;
    get collection(): Collection;
    get resource(): BaseRecordResource;
    get association(): CollectionField | undefined;
    get associationField(): CollectionField | undefined;
    getAclActionName(): string;
    /**
     * 获取可用于筛选的字段列表
     */
    getFilterFields(): Promise<{
        name: string;
        title: string;
        type: string;
        interface: string;
        getFirstSubclassNameOf: (baseClass: string) => string;
        target?: string;
        filterable?: {
            operators: {
                label: string;
                value: string;
            }[];
        };
    }[]>;
    getResourceSettingsInitParams(): ResourceSettingsInitParams;
    onInit(options: any): void;
    createResource(ctx: any, params: any): SingleRecordResource | MultiRecordResource;
    refresh(): Promise<void>;
    protected defaultBlockTitle(): string;
    addAppends(fieldPath: string, refresh?: boolean): void;
}
