/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ /** The Space Sketch disclosure popovers — kept out of the default panel flow: * Options (set-once settings) and Help (the full gesture legend). */ import type { BoundaryMode } from '@ifc-lite/create'; export interface OptionsPopoverProps { boundaryMode: BoundaryMode; onBoundaryMode: (m: BoundaryMode) => void; /** Whether this derive carried wall thickness — without it only `center` works. */ hasWallData: boolean; snapDelta: { from: number; to: number } | null; usedTol: number; /** The weld-tolerance control is disabled until a storey is derived. */ snapDisabled: boolean; onSnap: (tol: number | null) => void; snapTol: number | null; showBuilding: boolean; onToggleBuilding: () => void; showDiagnostics: boolean; onToggleDiagnostics: () => void; } export function OptionsPopover(props: OptionsPopoverProps) { const { boundaryMode, onBoundaryMode, hasWallData, snapDelta, usedTol, snapDisabled, onSnap, snapTol, showBuilding, onToggleBuilding, showDiagnostics, onToggleDiagnostics, } = props; return (