/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { LitElement, nothing } from 'lit'; import { PopconfirmShowConfig, PopconfirmPosition } from './popconfirm.types.js'; declare const NrPopconfirmManagerElement_base: (new (...args: any[]) => import("@nuralyui/common/mixins").DependencyAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").ThemeAware) & (new (...args: any[]) => import("@nuralyui/common/mixins").EventHandlerCapable) & (new (...args: any[]) => import("packages/common/src/shared/base-mixin.js").LightDomContent) & typeof LitElement; /** * # PopconfirmManager Component * * A container component that manages popconfirm instances displayed at cursor position. * Similar to toast notifications but for confirmation dialogs. * * ## Features * - Show popconfirm at cursor/mouse position * - Programmatic API for creating confirmations * - Async confirmation support with loading state * - Auto-dismiss on outside click or escape * - Customizable appearance and callbacks * * ## Usage * ```html * * * * * * ``` * * @element nr-popconfirm-manager * @fires nr-popconfirm-confirm - Fired when user confirms * @fires nr-popconfirm-cancel - Fired when user cancels */ export declare class NrPopconfirmManagerElement extends NrPopconfirmManagerElement_base { static useShadowDom: boolean; static styles: import("lit").CSSResult; requiredComponents: string[]; /** Active popconfirm items */ private items; /** Bound event handlers */ private _boundHandleOutsideClick; private _boundHandleKeydown; /** Timestamp when popconfirm was shown (to prevent immediate close from same click) */ private _showTimestamp; /** Static instance for global access */ private static _instance; connectedCallback(): void; disconnectedCallback(): void; /** * Get the global instance */ static getInstance(): NrPopconfirmManagerElement | null; /** * Static helper to show a confirmation dialog * Returns a promise that resolves to true if confirmed, false if cancelled */ static confirm(config: PopconfirmShowConfig, position: PopconfirmPosition): Promise; /** * Show a popconfirm at the specified position */ show(config: PopconfirmShowConfig, position: PopconfirmPosition): string; /** * Close a specific popconfirm */ close(id: string): void; /** * Close all popconfirms */ closeAll(): void; /** * Handle confirm button click */ private handleConfirm; /** * Handle cancel button click */ private handleCancel; /** * Handle clicks outside the popconfirm */ private handleOutsideClick; /** * Handle escape key */ private handleKeydown; /** * Adjust position to keep popconfirm within viewport */ private adjustPosition; /** * Generate unique ID */ private generateId; /** * Get icon color based on icon type */ private getIconClass; /** * Render a single popconfirm item */ private renderItem; render(): typeof nothing | import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'nr-popconfirm-manager': NrPopconfirmManagerElement; } } export {}; //# sourceMappingURL=popconfirm-manager.component.d.ts.map