/**
 * 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.
 */
export type ItemChain = {
    index?: number;
    length?: number;
    __is_new__?: boolean;
    __is_stored__?: boolean;
    value: any;
    parentItem?: ItemChain;
};
export type ItemChainResolver = (subPath: string) => boolean;
export type ParentItemAccessors = {
    parentPropertiesAccessor: (ctx?: any) => any;
    parentItemMetaAccessor: () => any;
    parentItemResolverAccessor: () => ItemChainResolver | undefined;
};
export declare function createItemChainGetter(options: {
    valueAccessor: () => any;
    parentItemAccessor?: () => ItemChain | undefined;
    indexAccessor?: () => number | undefined;
    lengthAccessor?: () => number | undefined;
    isNewAccessor?: () => boolean | undefined;
    isStoredAccessor?: () => boolean | undefined;
}): () => ItemChain;
export declare function createRootItemChain(formValues: any): ItemChain;
export declare function resolveRecordPersistenceState(record: any, filterTargetKey: string | string[] | null | undefined): {
    record: any;
    hasPrimaryKey: boolean;
    isNew: boolean;
    isStored: boolean;
};
export declare function buildCurrentItemTitle(t: (key: string) => string, collectionField?: any, fallbackName?: string): string;
export declare function createParentItemAccessorsFromContext(options: {
    parentContextAccessor: () => any;
    fallbackParentPropertiesAccessor?: (ctx?: any) => any;
}): ParentItemAccessors;
export declare function createParentItemAccessorsFromInputArgs(inputArgsAccessor: () => any): ParentItemAccessors;
export declare function createItemChainMetaFactory(options: {
    t: (key: string) => string;
    title: string;
    showIndex?: boolean;
    showParentIndex?: boolean;
    disableValueBranch?: boolean;
    valueBranchDisabledReason?: string;
    collectionAccessor: () => any;
    propertiesAccessor: (ctx: any) => any;
    parentCollectionAccessor?: () => any;
    parentPropertiesAccessor?: (ctx: any) => any;
    parentItemMetaAccessor?: () => any;
}): any;
export declare function createItemChainResolver(options: {
    collectionAccessor: () => any;
    disableValueBranch?: boolean;
    propertiesAccessor?: () => unknown;
    parentCollectionAccessor?: () => any;
    parentPropertiesAccessor?: () => unknown;
    parentItemResolverAccessor?: () => ((subPath: string) => boolean) | undefined;
}): (subPath: string) => boolean;
export type ItemChainMetaAndResolverOptions = {
    metaFactoryOptions: Parameters<typeof createItemChainMetaFactory>[0];
    resolverOptions: Parameters<typeof createItemChainResolver>[0];
};
export declare function createItemChainMetaAndResolver(options: ItemChainMetaAndResolverOptions): {
    meta: any;
    resolveOnServer: (subPath: string) => boolean;
};
export type AssociationItemChainContextPropertyOptions = {
    t: (key: string) => string;
    title: string;
    showIndex?: boolean;
    showParentIndex?: boolean;
    disableValueBranch?: boolean;
    valueBranchDisabledReason?: string;
    collectionAccessor: () => any;
    propertiesAccessor: (ctx: any) => any;
    resolverPropertiesAccessor?: () => unknown;
    parentCollectionAccessor?: () => any;
    parentAccessors?: Partial<ParentItemAccessors>;
    useParentItemMeta?: boolean;
    useParentItemResolver?: boolean;
};
export declare function createAssociationItemChainContextPropertyOptions(options: AssociationItemChainContextPropertyOptions): {
    serverOnlyWhenContextParams: true;
    meta: any;
    resolveOnServer: (subPath: string) => boolean;
    cache: false;
};
export declare function createItemChainContextPropertyOptions(options: ItemChainMetaAndResolverOptions): {
    serverOnlyWhenContextParams: true;
    meta: any;
    resolveOnServer: (subPath: string) => boolean;
    cache: false;
};
