// #region Imports
// #endregion
/**
 * Base error class for all router-related errors.
 *
 * @public
 */
export class RouterError extends Error {
    // #region Ctor
    constructor(message) {
        super(message);
        this.name = 'RouterError';
    }
}
/**
 * Thrown when a required `path` is missing from a route configuration.
 *
 * @public
 */
export class MissingPathError extends RouterError {
    // #region Ctor
    constructor() {
        super('Missing path.');
        this.name = 'MissingPathError';
    }
}
/**
 * Thrown when a required `component` is missing from a route configuration.
 *
 * @public
 */
export class MissingComponentError extends RouterError {
    // #region Ctor
    constructor() {
        super('Missing component.');
        this.name = 'MissingComponentError';
    }
}
/**
 * Thrown when navigation targets a path that does not match any registered route.
 *
 * @public
 */
export class RouteNotFoundError extends RouterError {
    // #region Ctor
    constructor(pathname) {
        super(`Route with path "${pathname}" not found.`);
        this.name = 'RouteNotFoundError';
    }
}
/**
 * Thrown when attempting to register a route whose path already exists.
 *
 * @public
 */
export class RouteAlreadyExistsError extends RouterError {
    // #region Ctor
    constructor(pathname) {
        super(`Route with path "${pathname}" already exists.`);
        this.name = 'RouteAlreadyExistsError';
    }
}
/**
 * Thrown when a `<mosaik-router-2>` element cannot be found in the document.
 *
 * @public
 */
export class RouterNotFoundError extends RouterError {
    // #region Ctor
    constructor() {
        super('Router not found.');
        this.name = 'RouterNotFoundError';
    }
}
//# sourceMappingURL=Errors.js.map