import type { MeasurementToolsState } from '../types'

export interface ValueProps extends Partial<MeasurementToolsState> {
  mapId: MeasurementToolsState['mapId']
}

export interface MeasurementToolsProviderProps {
  values: ValueProps[]
}

export interface MeasurementToolsStore {
  measurements: Record<
    MeasurementToolsState['mapId'],
    Omit<MeasurementToolsState, 'mapId'>
  >
  setModeInstance: (
    mapId: MeasurementToolsState['mapId'],
    mode: MeasurementToolsState['modeInstance'],
  ) => void
  setModeSelected: (
    mapId: MeasurementToolsState['mapId'],
    mode: MeasurementToolsState['modeSelected'],
  ) => void
  setFinished: (
    mapId: MeasurementToolsState['mapId'],
    finished: MeasurementToolsState['finished'],
  ) => void
  setDistance: (
    mapId: MeasurementToolsState['mapId'],
    distance: MeasurementToolsState['distance'],
  ) => void
  setUnit: (
    mapId: MeasurementToolsState['mapId'],
    unit: MeasurementToolsState['unit'],
  ) => void
  setLocale: (
    mapId: MeasurementToolsState['mapId'],
    locale: MeasurementToolsState['locale'],
  ) => void
  setPositions: (
    mapId: MeasurementToolsState['mapId'],
    positions: MeasurementToolsState['positions'],
  ) => void
  setEnabled: (
    mapId: MeasurementToolsState['mapId'],
    enabled: MeasurementToolsState['enabled'],
  ) => void
}
