import { PathNode, StateObject, UIRouter, ViewConfig, _ViewDeclaration } from "@uirouter/core"; import { RoutedLitElement, LitViewDeclaration, LitViewDeclarationTemplate, NormalizedLitViewDeclaration, LitViewDeclarationElement, DefaultResolvesType } from "./interface.js"; /** * Configuration for a Lit view instance. * * This class implements the ViewConfig interface from @uirouter/core * and is used internally by the router to manage view configurations. * * @internal */ export declare class LitViewConfig implements ViewConfig { path: PathNode[]; viewDecl: _ViewDeclaration; /** Unique identifier for this view config */ $id: number; /** Whether the view configuration has been loaded */ loaded: boolean; /** * Create a new LitViewConfig. * @param path - The path nodes for this view * @param viewDecl - The view declaration */ constructor(path: PathNode[], viewDecl: _ViewDeclaration); /** * Load the view configuration. * @returns A promise that resolves to this view config */ load(): Promise; } /** * Type guard to check if a view declaration is a template function. * * A template function is either: * - A function that returns a Lit TemplateResult * - A LitElement class (constructor props optional — props are also delivered * via the `_uiViewProps` property; see {@link RoutedLitElement}) * * @param config - The view declaration to check * @returns True if the config is a template function * @internal */ export declare function isLitViewDeclarationTemplate(config: LitViewDeclaration): config is LitViewDeclarationTemplate | LitViewDeclarationElement; /** * Type guard to check if a component is a RoutedLitElement class. * * @param component - The component to check * @returns True if the component is a LitElement class * @internal */ export declare function isRoutedLitElement(component?: unknown): component is RoutedLitElement; /** * State builder function for Lit views. * * When the StateBuilder builds a State object from a raw StateDeclaration, this builder * handles the `views` property with logic specific to lit-ui-router. * * If no `views: {}` property exists on the StateDeclaration, then it creates the `views` object and * applies the state-level configuration to a view named `$default`. * * @param state - The state object being built * @returns The normalized views object * @internal */ export declare function litViewsBuilder(state: StateObject): Record>; /** * The main router class for Lit applications. * * UIRouterLit extends the core {@link https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html | UIRouter} * class from @uirouter/core, adding Lit-specific view handling and component integration. * * @example Basic usage * ```ts * import { UIRouterLit } from 'lit-ui-router'; * import { hashLocationPlugin } from '@uirouter/core'; * * // Create router instance * const router = new UIRouterLit(); * * // Add a location plugin (hash-based or push state) * router.plugin(hashLocationPlugin); * * // Register states * router.stateRegistry.register({ * name: 'home', * url: '/home', * component: HomeComponent * }); * * // Start the router * router.start(); * ``` * * @example With push state and base URL * ```ts * import { UIRouterLit } from 'lit-ui-router'; * import { pushStateLocationPlugin } from '@uirouter/core'; * * const router = new UIRouterLit(); * router.plugin(pushStateLocationPlugin); * * // Configure base URL for push state * router.urlService.config.baseHref('/app/'); * * router.start(); * ``` * * @see {@link https://ui-router.github.io/core/docs/latest/ | UI-Router Core Documentation} * @see {@link https://ui-router.github.io/core/docs/latest/classes/_router_.uirouter.html | UIRouter API Reference} * * @category core */ export declare class UIRouterLit extends UIRouter { /** * Create a new UIRouterLit instance. * * The constructor automatically: * - Applies the services plugin for browser integration * - Registers the Lit view config factory * - Decorates the state registry with Lit-specific view building */ constructor(); /** Whether the router has been started */ private started; /** * Start the router and begin listening for URL changes. * * This method initializes URL synchronization and begins processing * state transitions based on the current URL. * * @throws {Error} If `start()` has already been called on this router instance * * @example * ```ts * const router = new UIRouterLit(); * router.plugin(hashLocationPlugin); * // Register states... * router.start(); // Begin routing * ``` */ start(): void; } //# sourceMappingURL=core.d.ts.map