import * as _angular_core from '@angular/core'; import { TemplateRef, InjectionToken, Signal, ElementRef } from '@angular/core'; /** * Single tab. Two modes, decided by inputs: * * - **Content tab** — projected children render in the parent's content * panel when this tab is active. * - **Router tab** — set `routerLink` and the tab becomes a link; the * parent skips its content panel and the consumer drops a * `` below the tab strip. */ declare class WrTab { /** Visible label on the tab strip. */ readonly title: _angular_core.InputSignal; /** * Stable identifier used by the parent to track the active tab. * Auto-generated if omitted. */ readonly key: _angular_core.InputSignal; /** Router target — when set, the tab becomes a `[routerLink]` link. */ readonly routerLink: _angular_core.InputSignal; /** Disable the tab. */ readonly disabled: _angular_core.InputSignalWithTransform; /** Tab content template; portaled into the parent's panel area. @internal */ readonly contentTpl: _angular_core.Signal>; private readonly parent; private readonly destroyRef; protected readonly isRouter: _angular_core.Signal; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Contract a `` uses to talk to its parent ``. * * @internal */ interface WrTabsContext { /** Currently active tab key (component-managed only). */ readonly active: Signal; /** Activate a tab by key (component-managed only). */ activate(key: string): void; /** Register a child tab so the parent can pick a default. */ register(tab: { key: string; routerLink: unknown; }): void; /** Unregister on destroy. */ unregister(key: string): void; } /** * Token a `` injects to register itself with — and read the active * key from — its parent `` host. * * @internal */ declare const WR_TABS: InjectionToken; /** * Tabbed container. Two modes depending on the child `` * definitions: * * - **Content** — children project body content; the parent renders an * active-tab panel automatically. * - **Router** — any child with `routerLink` switches the whole strip * into router mode; the parent skips its panel so the consumer can * drop a `` after it. * * @example * ```html * * * First panel * Second panel * * * * * * * * * ``` * * @see https://ngwr.dev/components/tabs */ declare class WrTabs implements WrTabsContext { /** Two-way bindable active tab key (content mode). */ readonly active: _angular_core.ModelSignal; /** Visual size variant. */ readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">; protected readonly tabs: _angular_core.Signal; /** When any child has a routerLink, the whole strip switches to router mode. */ protected readonly isRouter: _angular_core.Signal; /** Content-mode: the tab whose key matches `active()` (or the first tab if none yet). */ protected readonly activeTab: _angular_core.Signal; activate(key: string): void; register({ key }: { key: string; routerLink: unknown; }): void; unregister(): void; protected readonly stripRef: _angular_core.Signal | undefined>; /** Whether the strip is scrolled away from its start / end — drives the edge fades. */ protected readonly canScrollStart: _angular_core.WritableSignal; protected readonly canScrollEnd: _angular_core.WritableSignal; constructor(); /** Recompute which edges can scroll, from the strip's scroll metrics. @internal */ protected updateFades(): void; protected onTabClick(tab: WrTab): void; /** Header id for `aria-labelledby` on the panel. @internal */ headerId(key: string): string; /** Panel id for `aria-controls` on the tab header. @internal */ panelId(key: string): string; /** ArrowLeft/Right/Home/End keyboard navigation on the tab strip. */ protected onStripKeydown(event: KeyboardEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { WR_TABS, WrTab, WrTabs }; export type { WrTabsContext };