import { VChild } from '@gera2ld/jsx-dom'; import { IHostElementResult, MovableOptions } from '../util'; export interface IPanelOptions { /** * Whether to create the toast with ShadowDOM. * Note that CSS may not work with ShadowDOM in pages with strict CSP limits. */ shadow?: boolean; /** * Initial DOM content of panel body. */ content?: VChild; /** * Additional CSS for the toast. * `:host` can be used to match the host element. */ style?: string | ((id: string) => string); /** * Additional className for the toast root element */ className?: string; /** * Apply built-in themes, default as `light`. * Available values are `light` and `dark`, any other value will disable the theme CSS. */ theme?: string; } export interface IPanelResult extends IHostElementResult { /** * The wrapper element that should be positioned. It should be as simple as possible and let the body to style itself. */ wrapper: HTMLElement; /** * The container of contents. It is recommended to style your panel box here. */ body: HTMLElement; /** * Empty the panel body. */ clear: () => void; /** * Append elements to the panel body, shorthand for `panel.body.append(...)`. */ append: (...args: VChild[]) => void; /** * Replace the content of panel body by clearing it first and then {@link append}. */ setContent: (...args: VChild[]) => void; /** * Whether this panel can be moved by mouse dragging. */ setMovable: (toggle: boolean, options?: Partial) => void; } export declare function getPanel(options?: IPanelOptions): IPanelResult;