/** * Copyright Aquera Inc 2023 * * This source code is licensed under the BSD-3-Clause license found in the * LICENSE file in the root directory of this source tree. */ import { CSSResultArray, TemplateResult } from 'lit'; import '../nile-button/nile-button'; import NileElement from '../internal/nile-element'; import type { NileAppShellPanelMode } from '../nile-app-shell/nile-app-shell'; /** * @summary The shell's right region — the AI assistant panel; takes over the panel chrome while the shell keeps the geometry and open state. * * @status stable * @since 2.0 * * @tag nile-app-shell-panel * * @dependency nile-app-shell * @dependency nile-glyph * * @slot - The panel body. Scrolls. * @slot header - Replaces the default heading (mark plus label); the back control renders before it. * @slot actions - Controls added before the close button; size and clear their `base` part from page CSS to match the header's bare glyphs. * @slot footer - A composer, docked below the scroll region. * * @event nile-close - Emitted when the close button is pressed, after the shell has been told to close. * @event nile-back - Emitted when the back control is pressed; the page swaps its own content back. * @event nile-panel-back - Emitted right after `nile-back` for the same press, matching the shell's built-in panel chrome, so a page listening on the shell keeps working when it slots this component. Listen for one of the two, not both, or one press is handled twice. * * @csspart header - The header bar. * @csspart back - The back control, shown by `back`. * @csspart title - The default heading text. * @csspart actions - The header action group. * @csspart close - The close button. * @csspart body - The scrolling body. * @csspart footer - The footer. * * @cssproperty [--nile-app-shell-utility-size=32px] - Box the header's back and close controls sit in. * * @method goBack() - Emit `nile-back` then `nile-panel-back`, as the back control does. */ export declare class NileAppShellPanel extends NileElement { static get styles(): CSSResultArray; private shellLink; /** The heading, and the accessible name of the region. */ label: string; /** Drops the header bar entirely. */ noHeader: boolean; /** Shows a back control at the start of the header for a sub-view; the panel keeps no view stack and only emits `nile-back`. */ back: boolean; /** Accessible name of the back control. */ backLabel: string; /** Drops the close button — for a panel the page closes its own way. */ noClose: boolean; /** Removes the body's padding, for a full-bleed transcript. */ noPadding: boolean; /** Id of the shell to follow. Defaults to the nearest ancestor. */ shell?: string; /** Mirrors the shell's panel mode. Set by the shell; treat it as read-only and style against it (`nile-app-shell-panel[mode='overlay']`). */ mode: NileAppShellPanelMode; private _hasFooter; connectedCallback(): void; protected willUpdate(): void; protected updated(): void; /** Announce that the back control was pressed, as the page owns which view it goes back to: `nile-back`, then `nile-panel-back` for pages written against the shell's built-in panel chrome. */ goBack(): void; /** Close the panel through the shell. */ close(): void; private handleFooterSlotChange; render(): TemplateResult; } export default NileAppShellPanel; declare global { interface HTMLElementTagNameMap { 'nile-app-shell-panel': NileAppShellPanel; } }