import { EventEmitter } from '../../stencil-public-runtime'; export type PopConfirmPlacement = 'top' | 'right' | 'bottom' | 'left'; export type PopConfirmSize = 'small' | 'medium' | 'large'; export type PopConfirmStatus = 'info' | 'success' | 'warning' | 'error'; /** * @component BcmPopConfirm * @description A confirmation popover component that displays a confirmation dialog with customizable actions. * Built on the native Popover API for top-layer rendering and Floating UI for intelligent positioning. * Ideal for confirming destructive actions or important decisions inline. * * @slot - Default slot for the trigger element that opens the confirmation popover * @slot header - Custom header content (overrides headerText prop) * @slot body - Custom body content (overrides description prop) * @slot footer - Custom footer content with action buttons (overrides default confirm/cancel buttons) * * @csspart container - The main popover container element * @csspart arrow - The arrow pointer element * @csspart body - The body/description section * @csspart footer - The footer section with action buttons * * @example Basic Usage * ```html * * Delete * * ``` * * @example With Event Handlers * ```html * * Delete Item * * * * ``` * * @example Different Status Types * ```html * * * Info * * * * * Proceed * * * * * Continue * * * * * Delete * * ``` * * @example Custom Content with Slots * ```html * * Custom Confirm * *
* Custom Header *
* *
*

This is custom body content with HTML formatting.

* *
* *
* Maybe Later * Confirm *
*
* ``` * * @example Different Sizes * ```html * * * Small * * * * * Medium * * * * * Large * * ``` * * @example Programmatic Control * ```html * * Trigger * * * Show Programmatically * Hide Programmatically * * * ``` * * @example Without Status Icon * ```html * * Click Me * * ``` * * @example Different Placements * ```html * * Top * * * * Right * * * * Bottom * * * * Left * * ``` */ export declare class BcmPopConfirm { host: HTMLElement; private popconfirmRef?; private arrowRef?; private triggerRef?; private cleanupAutoUpdate?; private popconfirmId; /** * @prop {PopConfirmPlacement} placement - Position of the popover relative to the trigger element. * Automatically flips if there's not enough space. * Default: 'top' */ placement: PopConfirmPlacement; /** * @prop {PopConfirmSize} size - Size variant that controls padding and text size. * - 'small': Compact size with minimal padding * - 'medium': Standard size * - 'large': Spacious size with more padding * Default: 'medium' */ size: PopConfirmSize; /** * @prop {PopConfirmStatus} status - Status type that determines the color scheme and icon. * - 'info': Informational (blue) * - 'success': Success/positive action (green) * - 'warning': Warning/caution (yellow) * - 'error': Error/destructive action (red) * Default: 'info' */ status: PopConfirmStatus; /** * @prop {string} headerText - Text displayed in the header section. * Can be overridden by using the 'header' slot. * Default: '' */ headerText: string; /** * @prop {string} description - Description text displayed in the body section. * Can be overridden by using the 'body' slot. * Default: '' */ description: string; /** * @prop {string} confirmText - Text for the confirm button. * Default: 'Yes' */ confirmText: string; /** * @prop {string} cancelText - Text for the cancel button. * Default: 'Cancel' */ cancelText: string; /** * @prop {boolean} showArrow - Whether to show the arrow pointing to the trigger. * Default: true */ showArrow: boolean; /** * @prop {boolean} statusIcon - Whether to show the status icon in the header. * Icon only shows if headerText is also provided. * Default: true */ statusIcon: boolean; /** * @prop {number} offsetDistance - Distance in pixels between the popover and trigger element. * Default: 12 */ offsetDistance: number; /** * @prop {boolean} closeOnOutsideClick - Whether to close when clicking outside the popover. * Default: true */ closeOnOutsideClick: boolean; /** * @prop {boolean} closeOnEscape - Whether to close when pressing the Escape key. * Default: true */ closeOnEscape: boolean; isOpen: boolean; /** * @event bcmBeforeOpen - Emitted before the popover opens. * Useful for performing actions before the popover becomes visible. */ bcmBeforeOpen: EventEmitter; /** * @event bcmOpen - Emitted when the popover is opened. * Useful for tracking when the popover becomes visible. */ bcmOpen: EventEmitter; /** * @event bcmBeforeClose - Emitted before the popover closes. * Useful for performing cleanup actions before hiding. */ bcmBeforeClose: EventEmitter; /** * @event bcmClose - Emitted when the popover is closed. * Useful for tracking when the popover is hidden. */ bcmClose: EventEmitter; /** * @event bcmConfirm - Emitted when the user clicks the confirm button. * This is where you should handle the confirmed action. */ bcmConfirm: EventEmitter; /** * @event bcmCancel - Emitted when the user clicks cancel, presses Escape, or clicks outside. * Useful for tracking when the user dismisses the confirmation. */ bcmCancel: EventEmitter; handleOpenChange(open: boolean): Promise; /** * Programmatically shows the popconfirm. * @returns Promise that resolves when the show operation begins */ show(): Promise; /** * Programmatically hides the popconfirm. * @returns Promise that resolves when the hide operation begins */ hide(): Promise; /** * Toggles the popconfirm visibility. * If open, it will close. If closed, it will open. * @returns Promise that resolves when the toggle operation completes */ toggle(): Promise; private startAutoUpdate; private stopAutoUpdate; private updatePosition; private handleSlotChange; private setupTriggerListeners; private removeTriggerListeners; private handleTriggerClick; private handleOutsideClick; handleKeyDown(e: KeyboardEvent): void; private handleToggle; private handleConfirm; private handleCancel; componentWillLoad(): void; componentDidLoad(): void; disconnectedCallback(): void; private popconfirmClass; render(): any; }