/**
 * 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.
 */
/**
 * Per-branch context, shared by BOTH canvases (ADR-0003). Carries the branch
 * index, whether the branch accepts added nodes, and whether the branch is
 * sync-only. Zero dependencies (bare `React.createContext`, no runtime hooks),
 * so — like `NodeContext` — a single definition serves both runtimes: v1
 * re-exports it from here via the allowed `v1 → v2` import direction. Each
 * canvas's own `Branch` component supplies the value; `syncOnly` is optional, so
 * the modern canvas (which doesn't set it) is unaffected.
 */
import React from 'react';
export type BranchContextValue = {
    branchIndex: number | null;
    addable: boolean;
    /** Whether the branch is restricted to synchronous nodes. Optional — only the
     *  legacy canvas's `Branch` sets it; consumers read it via `?.syncOnly`. */
    syncOnly?: boolean;
};
export declare const BranchContext: React.Context<BranchContextValue>;
export declare function useBranchContext(): BranchContextValue;
export declare function useBranchIndex(): number;
export declare function useBranchSyncOnly(): boolean;
