import { __name } from "../_virtual/_rolldown/runtime.mjs"; import { DiagramMachineSnapshot } from "../likec4diagram/state/machine.mjs"; import "../likec4diagram/state/types.mjs"; import * as t from "@likec4/core/types"; //#region src/hooks/useDiagramCompareLayout.d.ts export declare function selectCompareLayoutState({ context }: DiagramMachineSnapshot): { isEnabled: false; hasEditor: boolean; isEditable: false; state: 'inactive'; drifts: null; canApplyLatest: boolean; layout: t.LayoutType; } | { isEnabled: true; hasEditor: boolean; isEditable: boolean; state: 'comparing' | 'inactive'; drifts: readonly [t.LayoutedViewDriftReason, ...t.LayoutedViewDriftReason[]]; canApplyLatest: boolean; layout: t.LayoutType; }; /** * Current manual-layout comparison state exposed by {@link useDiagramCompareLayout}. */ export type DiagramCompareLayoutState = ReturnType; /** * Manual-layout actions exposed by {@link useDiagramCompareLayout}. */ export type DiagramCompareLayoutOps = { /** * Toggles the compare mode on or off. */ toggleCompare: (force?: 'on' | 'off') => void; /** * Switches the layout type between 'auto' and 'manual'. */ switchLayout: (layoutType: t.LayoutType) => void; /** * Merges the latest layout into the manual layout. */ applyLatestToManual: () => void; /** * Resets the manual layout to its default state. */ resetManualLayout: () => void; }; /** * Controls LikeC4's manual-layout comparison from custom diagram children. * * The hook must be called by a component rendered inside {@link LikeC4Diagram}. */ export declare function useDiagramCompareLayout(): [DiagramCompareLayoutState, DiagramCompareLayoutOps]; //#endregion