1
|
import { LatLngTuple } from 'leaflet'
|
2
|
import { PathDto } from '../../swagger/data-contracts'
|
3
|
import { PathVariant } from './pathUtils'
|
4
|
|
5
|
export default interface TrackingToolState {
|
6
|
isLoading: boolean // whether the data is being loaded
|
7
|
pathDto?: PathDto // the data
|
8
|
pathVariants?: PathVariant[] // undefined signals that no path variants were yet fetched from the API
|
9
|
lastError?: string // consumable for errors during thunks
|
10
|
mapCenter: LatLngTuple // pair of latitude and longitude
|
11
|
primaryPathIdx: number // index of the primary path. This index is always in relation to the pathVariants array and not the current page
|
12
|
// trigger to close the dialog when API call is finished
|
13
|
dialogApiCallSuccess: boolean
|
14
|
pathsPerPage: number // max number of paths to show on the map at once
|
15
|
currentPage: number // current page of paths - starts from 0
|
16
|
}
|