import { useLocalStorage } from '@vueuse/core';
import { defineStore } from 'pinia';

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

export const useMarkStore = defineStore('mark', () => {
	const marks = useLocalStorage<markInfo[]>(key, []);

	return {
		marks,
	};
});
