/** @jsxImportSource @atom.io/spa */
import type { SpaElement } from "@atom.io/spa"
import { LABELS } from "./window-controller.ts"
import type { Rect, SnapTarget } from "./window-geometry.ts"
import { rectStyle, SNAP_TARGETS, snapRect } from "./window-geometry.ts"
import css from "./WindowOverlay.module.css"
export interface WindowPresentation {
rect?: Rect
preview?: Rect | undefined
interaction: boolean
paletteHidden: boolean
menuOpen: boolean
selected: SnapTarget | null
}
function SnapIcon(props: { target?: SnapTarget }): SpaElement {
const tile = props.target && snapRect(props.target, { width: 24, height: 16 })
return (
)
}
export function WindowOverlay(props: { state: WindowPresentation }): SpaElement {
return (
{SNAP_TARGETS.map((target) => (
))}
)
}