import { NotificationPosition } from '../../utils/constants'; /** * @slot default - Child content of the component. */ export declare class NvNotificationContainer { /** * The host element. With `followDialogs`, while a modal dialog is open it is * moved into that dialog, because a modal dialog sits in the top layer and * makes everything outside it inert. Without it the host never moves. */ el: HTMLNvNotificationcontainerElement; /** * Holds the container's place among its siblings while it is inside a modal * dialog (only with `followDialogs`), so it can go back to exactly where it * was. Null while it is home. */ private home; /** * The modal dialogs that currently count, in the order they started to * count. The last one is the most recently opened, so the container is in it. */ private modals; /** * Watches the document for `open` changes. Null while `followDialogs` is off, * until the container connects, after it has been removed, and wherever there * is no `MutationObserver`. */ private observer; /****************************************************************************/ /** * Position of the notification container on the screen. */ readonly position: `${NotificationPosition}`; /** * Whether the container follows modal dialogs. A modal dialog sits in the top * layer and makes everything outside it inert, so with this on the container * moves into the most recently opened one and back home when none is open. * Off by default: the container stays where it is rendered. * * `NotificationService` and the framework providers turn it on. If you set * it on a container you render yourself, render the container alone in a * stable wrapper element, and add, remove or re-key the wrapper, never the * container. A wrapper removed while a dialog is open leaves the container in * that dialog until the dialog closes. */ readonly followDialogs: boolean; /****************************************************************************/ /** * Starts or stops following when the prop changes at runtime. Stopping takes * the container home if it is away. */ followDialogsChanged(): void; /****************************************************************************/ /** * Starts following modal dialogs, if that is switched on. Moving the element * runs this again, once for each move. The observer already exists by then, * so that is the signal to leave it alone. */ connectedCallback(): void; /** * Starts following when `followDialogs` was set after the element connected * but before it finished loading, as the React wrapper does: it sets * properties once the element is in the page. Stencil does not run watchers * until the component is ready, so neither `connectedCallback` nor the * watcher saw the value. Starting twice is harmless. */ componentDidLoad(): void; /** * Starts handling a removal. Moving the element runs this too, and the two * cannot be told apart until the move has finished, so the decision waits * for the end of the current microtask. */ disconnectedCallback(): void; /****************************************************************************/ /** * Begins watching the document for dialogs and puts the container where it * belongs. */ private start; /** * Stops watching, and takes the container home if it is inside a dialog. */ private stop; /** * Puts the container back where it was and clears its popover. Does nothing * while it is home. */ private goHome; /** * Decides, once a disconnect has settled, whether the container was moved or * removed. */ private afterDisconnect; /** * Whether a dialog is one the container should be inside of, which is while * it is open as a modal. * * That lasts until the native `` has closed, not until `nv-dialog` or * `nv-drawer` start to close: both drop their own `open` attribute at once * but keep the `` open while it fades out. The container is a popover * for that time, above the fade, so it has nothing to leave early for. * @param {HTMLDialogElement} dialog - The dialog to check. * @returns {boolean} True when it matches `:modal`. */ private counts; /** * Whether a modal dialog is open inside the container itself, for example * one in the actions of a notification. * @returns {boolean} True when one matches `:modal`. */ private holdsModal; /** * Whether the container is inside a dialog that has closed, which is one that * no longer matches `:modal`. * @returns {boolean} True when the container is away from home and the * `` it sits in no longer counts. */ private sitsInClosedDialog; /** * Puts the container where it belongs right now: in the most recently * opened modal dialog that counts, shown as a popover, or else home. * @param {MutationRecord[]} [records] - The `open` changes that triggered * this, in the order they happened. They say which dialogs entered the top * layer, and in what order. Without them, the DOM order is known, and a hit * test finds the top one of the dialogs that were already open. */ private sync; /** * Shows the container as a manual popover. Inside the `` it would be * clipped, scrolled and faded along with the dialog, because the dialog is * its containing block, its scroll container and its opacity group. A popover * is in the top layer: laid out against the viewport and painted above the * dialog. It is still a DOM descendant of the modal, so it stays usable. * Without popover support the container stays a plain child of the dialog. */ private openPopover; /** * Hides the container's popover if it is showing. A DOM move hides it as * well, this only makes that explicit. */ private closePopover; /** * Hides the container's popover and takes the `popover` attribute off again, * for when the container leaves the dialogs, whether it goes home or is gone. */ private clearPopover; /** * Lets go of everything, for when the container has been removed. */ private teardown; /****************************************************************************/ render(): any; }