"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useContext } from "react";
const Context = createContext("design");
/**
 * Provides the current graph rendering mode to all descendant workflow
 * components. Nodes, edges, and interaction components read from this
 * context to decide which affordances to render.
 *
 * The default mode is `"design"` to maintain backward compatibility
 * with the existing canvas editor (which does not wrap in a provider).
 */
export function WorkflowGraphModeProvider({ mode, children }) {
    return _jsx(Context.Provider, { value: mode, children: children });
}
/**
 * Returns the current workflow graph rendering mode.
 *
 * Defaults to `"design"` when used outside a provider, ensuring existing
 * editor code continues to work without modification.
 */
export function useWorkflowGraphMode() {
    return useContext(Context);
}
//# sourceMappingURL=WorkflowGraphModeContext.js.map