import type { AppStore } from "@editor/store"; import type { MaskViewMode, ViewportState } from "@editor/state"; import type { BrushSettings, ToolId } from "@editor/tools"; import { BrushControls } from "./bottom-controls/BrushControls"; import { PanControls } from "./bottom-controls/PanControls"; import { TransformControls } from "./bottom-controls/TransformControls"; import { ZoomControls } from "./bottom-controls/ZoomControls"; import type { Rect } from "@core/geometry"; import type { TransformTarget } from "@editor/transform"; export type BottomControlsAction = "pan" | "zoom"; export type BottomControlsIslandProps = { viewport: ViewportState; visible: boolean; action: BottomControlsAction; activeTool: ToolId; brushSettings: BrushSettings; editingMask?: boolean; maskViewMode?: MaskViewMode; transformBounds?: Rect; transformTarget?: TransformTarget; brushHint?: string; dispatch: AppStore["dispatch"]; }; export function BottomControlsIsland({ viewport, visible, action, activeTool, brushSettings, editingMask = false, maskViewMode = "composite", transformBounds, transformTarget, brushHint, dispatch }: BottomControlsIslandProps) { const zoomPercent = Math.round(viewport.zoom * 100); const x = Math.round(viewport.center.x); const y = Math.round(viewport.center.y); return (