import { getUiPreferences, patchUiPreferences } from './uiPreferencesDb'; export type CanvasInteractionMode = 'pan' | 'select'; /** @deprecated CanvasInteractionMode */ export type StrategyCanvasInteractionMode = CanvasInteractionMode; export function loadCanvasInteractionMode(): CanvasInteractionMode { const mode = getUiPreferences().strategyEditor?.canvasInteraction; return mode === 'pan' ? 'pan' : 'select'; } export function saveCanvasInteractionMode(mode: CanvasInteractionMode): void { patchUiPreferences({ strategyEditor: { canvasInteraction: mode } }); }