/**
 * 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 type { CollectionOptions } from '@nocobase/flow-engine';
import { FC, ReactNode } from 'react';
export interface ExtendCollectionsProviderProps {
    /** Data source key to extend. Defaults to `'main'`. */
    dataSource?: string;
    /** Collections to surface for the lifetime of this provider's subtree. */
    collections: CollectionOptions[];
    /**
     * When `true`, re-sync the data source whenever the `collections` prop
     * reference changes after mount: add entries newly present in the prop and
     * remove entries no longer present (only those this provider registered).
     * The diff runs in the same render as the prop change so children see the
     * new state on their first render — at the cost of one observable mutation
     * per change.
     *
     * Defaults to `false`. Most pages pass a stable (often module-level)
     * `collections` list and don't need this; leaving it off avoids accidental
     * re-registration when callers forget to memoize. Enable only when your
     * collection list legitimately varies during the provider's lifetime.
     */
    syncOnChange?: boolean;
    children?: ReactNode;
}
/**
 * Mount-scoped collection injector. Adds the given `collections` to the target
 * data source on first render — synchronously, so children can read
 * `getCollection(name)` on their own first render — and removes them on
 * unmount. Survives mid-session data-source reloads via the
 * `dataSource:loaded` event by re-registering only the names this provider
 * owns.
 *
 * Use this for client-only collections — e.g. a `schema-only` server
 * collection that isn't auto-published to the v2 data source, or a pure
 * UI-side mirror — so downstream components (like `<CollectionFilter>`) can
 * resolve the collection by name.
 *
 * Default behavior is "static-at-mount": subsequent changes to the
 * `collections` prop are ignored. Pass `syncOnChange` to opt into diffing on
 * prop change.
 */
export declare const ExtendCollectionsProvider: FC<ExtendCollectionsProviderProps>;
export default ExtendCollectionsProvider;
