import { useLocalStorage } from "@vueuse/core"

const key = 'map-marks'
export type markType = 'localtion' | 'equipment'
export type markInfo = { latlng: [number, number], title: string, opacity?: number, type?: markType }

function useMarks(initData: markInfo[] = []) {
    const stroked = useLocalStorage<markInfo[]>(key, initData);
    return stroked;
}

export default useMarks