import { type TemplateResult } from "lit"; import GlobalStyle from "../../internal/global-style.js"; declare const linkTypes: { readonly push: "push"; readonly replace: "replace"; readonly normal: "normal"; readonly auto: "auto"; }; type LinkType = keyof typeof linkTypes; /** * {@linkcode Link} is used for link jumping, works standalone or in {@linkcode Router}. * * Set `type` to `"normal"`, * behave like a normal anchor. * * Set `type` to `"push" `or `"replace"`, * update history state by `history.pushState` or `history.replaceState`, * update all routers whether current pathname is registered or not. * * Set `type` to `"auto"`, * only update the routers if the current pathname is registered, * if not registered, behave like `"normal"`. * * `replace` property will enforce `history.replaceState`. * * @fires navigate - Fires when the link is clicked. * @category navigation */ declare class Link extends GlobalStyle { /** * If `"normal"`, behave like a normal anchor. * * If `"auto"` or `"push"`, call `history.pushState` if `replace` is false, * * If `"replace"`, call `history.replaceState`. */ type: LinkType; /** * If `true`, the {@linkcode Router} will not be updated. */ suppress: boolean; /** * Use `replaceState` instead of `pushState`. */ replace: boolean; /** * A element href. */ href: string; /** * A element target. */ target: "_blank" | "_self" | "_parent" | "_top"; /** * Location state object. */ state: {}; get pathname(): string; protected _handleClick(e: MouseEvent): void; handleState: () => void; protected render(): TemplateResult<1>; } export default Link; export { Link };