import { IRouter } from 'express';
import { SignalKMessageHub, WithConfig } from '../../app';
import { WithSecurityStrategy } from '../../security';
import { PointDestination, RouteDestination, CourseInfo } from '@signalk/server-api';
import { ResourcesApi } from '../resources';
import { ConfigApp } from '../../config/config';
export declare const COURSE_API_V2_DELTA_COUNT = 13;
export declare const COURSE_API_V1_DELTA_COUNT = 8;
export declare const COURSE_API_INITIAL_DELTA_COUNT: number;
export interface CourseApplication extends IRouter, ConfigApp, WithConfig, WithSecurityStrategy, SignalKMessageHub {
}
export declare class CourseApi {
    private app;
    private resourcesApi;
    private courseInfo;
    private store;
    private cmdSource;
    private unsubscribes;
    constructor(app: CourseApplication, resourcesApi: ResourcesApi);
    start(): Promise<void>;
    /**
     * Resource delta message processing to ensure update made to
     * 1. waypoint referenced as the current destination OR
     * 2. active route
     * are reflected in course deltas.
     */
    private processResourceDeltas;
    private parseSettings;
    private saveSettings;
    /** Process deltas for <destination>.nextPoint data
     * Note: Delta source cannot override destination isAPIset by API!
     * Destination is set when:
     * 1. There is no current destination
     * 2. msg source matches current Destination source
     * 3. Destination Position is changed.
     */
    private processV1DestinationDeltas;
    /** Test for valid Signal K position */
    private isValidPosition;
    /** Process stream value and take action
     * @param cmdSource Object describing the source of the update
     * @param pos Destination location value in the update
     */
    private parseStreamValue;
    /** Get course (exposed to plugins) */
    getCourse(): Promise<CourseInfo>;
    /** Clear destination / route (exposed to plugins) */
    clearDestination(persistState?: boolean): Promise<void>;
    /** Set course (exposed to plugins)
     * @param dest Setting to null clears the current destination
     */
    destination(dest: (PointDestination & {
        arrivalCircle?: number;
    }) | null): Promise<void>;
    /** Set / clear route (exposed to plugins)
     * @param dest Setting to null clears the current destination
     */
    activeRoute(dest: RouteDestination | null): Promise<void>;
    private getVesselPosition;
    private validateCourseInfo;
    private isValidRouteCourse;
    private isValidWaypointCourse;
    private updateAllowed;
    private initCourseRoutes;
    private calcReversedIndex;
    private activateRoute;
    private setDestination;
    private isValidArrivalCircle;
    private isValidIsoTime;
    private parsePointIndex;
    private parseHref;
    private getRoutePoint;
    private getRoutePoints;
    private getRoute;
    private buildDeltaMsg;
    private buildV1DeltaMsg;
    private emitCourseInfo;
    private isAPICmdSource;
    private isSourceChange;
    private isCurrentCmdSource;
}
//# sourceMappingURL=index.d.ts.map