import * as i0 from '@angular/core'; import { InjectionToken, TemplateRef, AfterContentInit, OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, AfterViewInit, QueryList } from '@angular/core'; import * as i1$1 from '@angular/cdk/accordion'; import { CdkAccordionItem, CdkAccordion } from '@angular/cdk/accordion'; import * as i1$2 from '@angular/cdk/portal'; import { TemplatePortal } from '@angular/cdk/portal'; import * as i1 from '@sbb-esta/angular/core'; import { TypeRef } from '@sbb-esta/angular/core'; import * as i3 from '@sbb-esta/angular/icon'; import { FocusableOption, FocusOrigin } from '@angular/cdk/a11y'; import { Subject } from 'rxjs'; /** * Base interface for a `SbbExpansionPanel`. * @docs-private */ interface SbbExpansionPanelBase extends CdkAccordionItem { /** Whether the toggle indicator should be hidden. */ hideToggle: boolean; } /** * Token used to provide a `SbbExpansionPanel` to `SbbExpansionPanelContent`. * Used to avoid circular imports between `SbbExpansionPanel` and `SbbExpansionPanelContent`. */ declare const SBB_EXPANSION_PANEL: InjectionToken; /** * Expansion panel content that will be rendered lazily * after the panel is opened for the first time. */ declare class SbbExpansionPanelContent { _template: TemplateRef; _expansionPanel: SbbExpansionPanelBase | null; constructor(...args: unknown[]); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** SbbExpansionPanel's states. */ type SbbExpansionPanelState = 'expanded' | 'collapsed'; /** @docs-private */ declare const _SbbExpansionPanelBase: i1.AbstractConstructor & typeof CdkAccordionItem; /** * This component can be used as a single element to show expandable content, or as one of * multiple children of an element with the SbbAccordion component attached. */ declare class SbbExpansionPanel extends _SbbExpansionPanelBase implements AfterContentInit, OnChanges, OnDestroy { private _viewContainerRef; private readonly _animationsDisabled; private _document; private _ngZone; private _elementRef; /** Whether the toggle indicator should be hidden. */ get hideToggle(): boolean; set hideToggle(value: boolean); private _hideToggle; /** An event emitted after the body's expansion animation happens. */ afterExpand: EventEmitter; /** An event emitted after the body's collapse animation happens. */ afterCollapse: EventEmitter; /** Stream that emits for changes in `@Input` properties. */ readonly _inputChanges: Subject<{ [propName: string]: i0.SimpleChange; }>; /** Optionally defined accordion the expansion panel belongs to. */ accordion: SbbAccordion; /** Content that will be rendered lazily. */ _lazyContent: SbbExpansionPanelContent; /** Element containing the panel's user-provided content. */ _body: ElementRef; /** Element wrapping the panel body. */ protected _bodyWrapper: ElementRef | undefined; /** Portal holding the user's content. */ _portal: TemplatePortal; /** ID for the associated header element. Used for a11y labelling. */ _headerId: string; constructor(...args: unknown[]); /** Gets the expanded state string. */ _getExpandedState(): SbbExpansionPanelState; /** Toggles the expanded state of the expansion panel. */ toggle(): void; /** Sets the expanded state of the expansion panel to false. */ close(): void; /** Sets the expanded state of the expansion panel to true. */ open(): void; ngAfterContentInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private _transitionEndListener; protected _setupAnimationEvents(): void; /** Checks whether the expansion panel's content contains the currently-focused element. */ _containsFocus(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_expanded: unknown; static ngAcceptInputType_disabled: unknown; static ngAcceptInputType_hideToggle: unknown; } /** * This component corresponds to the header element of an ``. */ declare class SbbExpansionPanelHeader implements AfterViewInit, OnDestroy, FocusableOption { panel: SbbExpansionPanel; private _element; private _focusMonitor; private _changeDetectorRef; private _document; tabIndex: number; private _parentChangeSubscription; constructor(...args: unknown[]); /** * Whether the associated panel is disabled. Implemented as a part of `FocusableOption`. * @docs-private */ get disabled(): boolean; /** Toggles the expanded state of the panel. */ _toggle(): void; /** Gets whether the panel is expanded. */ _isExpanded(): boolean; /** Gets the expanded state string of the panel. */ _getExpandedState(): string; /** Gets the panel id. */ _getPanelId(): string; /** Gets whether the expand indicator should be shown. */ _showToggle(): boolean; /** Handle keydown event calling to toggle() if appropriate. */ _keydown(event: TypeRef): void; /** * Focuses the panel header. Implemented as a part of `FocusableOption`. * @param origin Origin of the action that triggered the focus. * @docs-private */ focus(origin?: FocusOrigin, options?: FocusOptions): void; ngAfterViewInit(): void; ngOnDestroy(): void; private _isFocused; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_tabIndex: unknown; } declare class SbbAccordion extends CdkAccordion implements AfterContentInit, OnDestroy { private _keyManager; /** Headers belonging to this accordion. */ private _ownHeaders; /** All headers inside the accordion. Includes headers inside nested accordions. */ _headers: QueryList; /** Whether the expansion indicator should be hidden. */ hideToggle: boolean; ngAfterContentInit(): void; /** Handles keyboard events coming in from the panel headers. */ _handleHeaderKeydown(event: KeyboardEvent): void; _handleHeaderFocus(header: SbbExpansionPanelHeader): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_hideToggle: unknown; } declare class SbbAccordionModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * Token used to provide a `SbbAccordion` to `SbbExpansionPanel`. * Used primarily to avoid circular imports between `SbbAccordion` and `SbbExpansionPanel`. */ declare const SBB_ACCORDION: InjectionToken; export { SBB_ACCORDION, SBB_EXPANSION_PANEL, SbbAccordion, SbbAccordionModule, SbbExpansionPanel, SbbExpansionPanelContent, SbbExpansionPanelHeader }; export type { SbbExpansionPanelBase, SbbExpansionPanelState };