import type { ReactiveController, ReactiveControllerHost } from 'lit';
import type { IRoutesConnectedEventDetail } from './../Events/IRoutesConnectedEventDetail';
import type { IBaseRouteConfig, IRouteView } from './../Route/Interfaces/IBaseRouteConfig';
import type { RouteConfig } from './../Route/RouteConfig';
import type { HTMLTemplateResult } from './../../Dom/Html';
/**
 * The config options for a RouterController.
 */
export interface IRouterControllerConfig {
    useHash?: boolean;
    fallback?: IBaseRouteConfig;
    callback?: (route: RouteConfig) => void;
    scrollRestoration?: ScrollRestoration;
}
/**
 * A reactive controller that performs location-based routing using a
 * configuration of URL patterns and associated render callbacks.
 *
 * @fires routesConnected - Fired when a child routes controller is connected.
 *
 * @public
 */
export declare class RouterController implements ReactiveController {
    private static readonly ORIGIN;
    private readonly _childRoutes;
    private readonly _host;
    /**
         * State related to the current matching route.
         *
         * We keep this so that consuming code can access current parameters, and so
         * that we can propagate tail matches to child routes if they are added after
         * navigation / matching.
         */
    private _currentPathname;
    private _currentRoute;
    private _currentParams;
    private _parentRoutes;
    /**
         * Callback to call when this controller is disconnected.
         *
         * It's critical to call this immediately in hostDisconnected so that this
         * controller instance doesn't receive a tail match meant for another route.
         */
    private _onDisconnect;
    private _windowClickSubscription;
    private _windowPopStateSubscription;
    private _hostRoutesConnectedSubscription;
    /**
     * Constructs a new instance of the `MutationController` class.
     *
     * @public
     */
    constructor(host: ReactiveControllerHost & HTMLElement, routes: Array<RouteConfig>, config?: IRouterControllerConfig);
    /**
     * The currently installed set of routes in precedence order.
     *
     * This array is mutable. To dynamically add a new route you can write:
     *
     * ```ts
     * this._routes.routes.push({
     *   path: '/foo',
     *   render: () => html`<p>Foo</p>`,
     * });
     * ```
     *
     * Mutating this property does not trigger any route transitions. If the
     * changes may result is a different route matching for the current path, you
     * must instigate a route update with `navigate()`.
     */
    routes: Array<RouteConfig>;
    /**
         * A default fallback route which will always be matched if none of the
         * {@link routes} match. Implicitly matches to the path "/*".
         */
    readonly fallback?: IBaseRouteConfig | undefined;
    readonly callback?: ((route: RouteConfig) => void) | undefined;
    useHash: boolean;
    /**
     * Gets or sets the `scrollRestoration` property.
     *
     * @public
     */
    get scrollRestoration(): ScrollRestoration;
    set scrollRestoration(value: ScrollRestoration);
    /**
     * The current parsed route parameters.
     */
    get params(): Record<string, string | undefined>;
    hostConnected(): void;
    hostDisconnected(): void;
    /**
     * Navigates this routes controller to `pathname`.
     *
     * This does not navigate parent routes, so it isn't (yet) a general page
     * navigation API. It does navigate child routes if pathname matches a
     * pattern with a tail wildcard pattern (`/*`).
     */
    navigate(pathname: string): Promise<void>;
    /**
     * Returns a URL string of the current route, including parent routes,
     * optionally replacing the local path with `pathname`.
     */
    link(pathname?: string): string;
    /**
     * The result of calling the current route's render() callback.
     */
    outlet(): IRouteView | HTMLTemplateResult | undefined;
    /**
     * Matches `url` against the installed routes and returns the first match.
     */
    private getRoute;
    private onRoutesConnected;
    private onWindowClick;
    private onWindowPopState;
}
declare global {
    interface HTMLElementEventMap {
        routesConnected: CustomEvent<IRoutesConnectedEventDetail>;
    }
}
//# sourceMappingURL=RouterController.d.ts.map