import type { AppStore } from "@editor/store"; import type { ViewportState } from "@editor/state"; import { PanControls } from "./bottom-controls/PanControls"; import { SelectionControls } from "./bottom-controls/SelectionControls"; import { ZoomControls } from "./bottom-controls/ZoomControls"; import type { SelectionSummary } from "./selectionSummary"; export type BottomControlsAction = "pan" | "zoom"; export type BottomControlsIslandProps = { viewport: ViewportState; visible: boolean; action: BottomControlsAction; selection: SelectionSummary; dispatch: AppStore["dispatch"]; onOpenLayers: () => void; }; export function BottomControlsIsland({ viewport, visible, action, selection, dispatch, onOpenLayers }: BottomControlsIslandProps) { const zoomPercent = Math.round(viewport.zoom * 100); const x = Math.round(viewport.center.x); const y = Math.round(viewport.center.y); return (
{selection.type !== "none" ? ( ) : action === "pan" ? ( ) : ( )}
); }