import type { ComponentType, CSSProperties, HTMLAttributes, ReactNode, } from 'react'; export interface MapContextValue { mapRef: { current: unknown }; drawRef: { current: unknown }; mapContainerRef: { current: unknown }; sources: Record; setSources: (sources: Record) => void; mode: string; setMode: (mode: string) => void; status: string; setStatus: (status: string) => void; showDrawActionPopup: boolean; setShowDrawActionPopup: (value: boolean) => void; isDetailActive: boolean; setIsDetailActive: (value: boolean) => void; } export interface MapStoreState { [key: string]: unknown; } export type MapStateSelector = (state: MapStoreState) => T; export interface AgvMapConfigs { themeMode?: 'light' | 'dark' | 'system' | string; username?: string; [key: string]: unknown; } export interface RootProps { children?: ReactNode; configs?: AgvMapConfigs; authToken?: string; } export interface ProvidersProps { children?: ReactNode; markers?: unknown[]; } export interface ThemeProviderProps { children?: ReactNode; configs?: AgvMapConfigs; defaultTheme?: string; } export interface MapProps { children?: ReactNode; style?: CSSProperties; configs?: AgvMapConfigs; showThemeToggle?: boolean; initialSpinner?: ReactNode; /** Enable zooming with plain mouse-wheel or trackpad scrolling. Defaults to false. */ zoomOnScroll?: boolean; } export interface MapPartProps extends HTMLAttributes { mapRef?: { current: unknown }; dateRange?: unknown; configs?: AgvMapConfigs; onDateSelect?: (date?: unknown) => void; [key: string]: unknown; } export const Root: ComponentType; export const Providers: ComponentType; export const themeProvider: ComponentType; export const ThemeProvider: ComponentType; export const Map: ComponentType; export const NDVILayer: ComponentType; export const LayerDataViewer: ComponentType; export const ColorLegend: ComponentType; export const BottomControls: ComponentType; export const Markers: ComponentType; export const MarkerPopup: ComponentType; export const Farms: ComponentType; export const Plots: ComponentType; export const NavbarWrapper: ComponentType; export const DateHierarchyDropdownV2: ComponentType; export const PAWStatusPieChart: ComponentType; export const DrawPolygonControl: ComponentType; export const EditPlotGeometryControl: ComponentType; export const AddPlotControl: ComponentType; export const AddStationControl: ComponentType; export const AddFarmModal: ComponentType; export const PickerControl: ComponentType; export const AreaDetails: ComponentType; export const StatusBar: ComponentType; export const MapLoadingOverlay: ComponentType; export const FarmETProgressIndicator: ComponentType; // Self-contained map-part components (produce their own positioning and // conditional logic; consume the nearest automatically). export interface MapPartVariantProps extends MapPartProps { variant?: 'single' | 'split'; } export const MapControl: ComponentType; export const MapDateSelector: ComponentType; export const MapPickerControl: ComponentType; export const MapRasterLayer: ComponentType; export const MapPlots: ComponentType; export const MapFarms: ComponentType; export const MapEditingControls: ComponentType; export const ComparisonMap: ComponentType<{ mapProps?: unknown; children?: ReactNode; }>; // Positioning wrappers (classic overlay layout pieces from map-parts). export const MapNavbar: ComponentType; export const MapFarmProgress: ComponentType< MapPartProps & { children?: ReactNode } >; export const MapPawStatus: ComponentType; export const MapDataViewer: ComponentType; export const MapColorLegend: ComponentType; export const MapBottomControls: ComponentType; export interface AgvMapProps extends MapProps { markers?: unknown[]; authToken?: string; } export const AgvMap: ComponentType; export function useMapContext(): MapContextValue; export function useMapState(selector?: MapStateSelector): T; export function useFarms(): Record; export function usePlots(): Record; export function useMarkers(): Record; export function useRasterLayer(): Record; export function useSettings(): Record; export function useInitialView(): unknown; export function useDarkMode(): boolean; export function useUserPreferences(): Record; export function useConfirm(): unknown; export function useTour(): Record;