import { Button, Flex, FloatingIndicator, Popover, SegmentedControl } from '@mantine/core' import { Mode, setMode, useMapStore } from '../../store/map' import { IconChevronDown, IconCropLandscape, IconCropPortrait, IconEdit, IconEye, IconPrinter } from '@tabler/icons-react' import { useEffect, useState } from 'react' import { PrintOrientation, setPrintOrientation, usePrintStore } from '../../store/print' const MapMode = ({ map_id }: { map_id: string }) => { const [rootRef, setRootRef] = useState(null); const [controlsRefs, setControlsRefs] = useState>({}); const { mode } = useMapStore().id[map_id] const setControlRef = (item: Mode) => (node: HTMLButtonElement) => { controlsRefs[item] = node; setControlsRefs(controlsRefs); } const { printOrientation } = usePrintStore() useEffect(() => { }, [printOrientation]) return ( { setPrintOrientation(value as PrintOrientation) setMode(map_id, 'print' as Mode) }} data={[ { value: 'horizontal', label: ( ), }, { value: 'vertical', label: ( ), }, ]} /> ) } export default MapMode