import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
import { default as CxDropdown } from '../../../atoms/src/components/dropdown/dropdown.ts';
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
import { default as CxInput } from '../../../atoms/src/components/input/input.ts';
import { default as CxMenu } from '../../../atoms/src/components/menu/menu.ts';
import { default as CxMenuItem } from '../../../atoms/src/components/menu-item/menu-item.ts';
import { default as CxPopup } from '../../../atoms/src/components/popup/popup.ts';
import { default as CxSpace } from '../../../atoms/src/components/space/space.ts';
import { default as CxTooltip } from '../../../atoms/src/components/tooltip/tooltip.ts';
import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
import { CSSResultGroup } from 'lit';

/**
 * @summary Popup for find-and-replace controls.
 *
 * @description Renders a lightweight top-end popup that delegates all find/replace behavior to host listeners through
 * custom events. The component only gathers user input, shows optional occurrence progress, and emits intent.
 *
 * @event {{ findText: string; replaceText: string }} cx-find-and-replace-find - Fired when the user clicks the Find button or presses Enter in the search input.
 * @event {{ findText: string; replaceText: string }} cx-find-and-replace-replace - Fired when the user clicks the Replace button.
 * @event {{ findText: string; replaceText: string }} cx-find-and-replace-replace-all - Fired when the user clicks the Replace all button.
 * @event {{ findText: string }} cx-find-and-replace-previous - Fired when the user navigates to the previous match.
 * @event {{ findText: string }} cx-find-and-replace-next - Fired when the user navigates to the next match.
 *
 * @cssproperty [--find-and-replace-width=24rem] - Preferred dialog width token; used with viewport clamping on the inner dialog.
 */
export default class CxFindAndReplace extends CortexElement {
    static readonly styles: CSSResultGroup;
    static readonly dependencies: {
        'cx-button': typeof CxButton;
        'cx-dropdown': typeof CxDropdown;
        'cx-icon-button': typeof CxIconButton;
        'cx-input': typeof CxInput;
        'cx-menu': typeof CxMenu;
        'cx-menu-item': typeof CxMenuItem;
        'cx-popup': typeof CxPopup;
        'cx-space': typeof CxSpace;
        'cx-tooltip': typeof CxTooltip;
        'cx-typography': typeof CxTypography;
    };
    private readonly localize;
    private readonly searchInputEl;
    open: boolean;
    /** Distance in pixels from the viewport top-right corner for popup anchoring. */
    popupDistance: number;
    /** One-based index of the highlighted search match shown in the progress text. */
    currentOccurrence: number;
    /** Total number of matched search occurrences shown in the progress text. */
    totalOccurrences: number;
    /** Hides the occurrence progress text when true. */
    hideOccurrenceProgress: boolean;
    /** Current text used for finding matches. */
    private findText;
    /** Current text used for replacement actions. */
    private replaceText;
    private matchCase;
    private wholeWord;
    private findInSelection;
    private readonly popupAnchor;
    handleOpenChange(): Promise<void>;
    show(searchTerm?: string): Promise<boolean>;
    hide(): Promise<boolean>;
    private handlePanelKeyDown;
    private getActionDetail;
    private getNavigateDetail;
    private handleFindTextInput;
    private handleFindTextKeyDown;
    private handleReplaceTextInput;
    private handleFind;
    private handleReplaceClick;
    private handleReplaceAllClick;
    private handlePreviousClick;
    private handleNextClick;
    private handleCloseClick;
    private handleSearchOptionSelect;
    private renderOccurrenceSummary;
    render(): import('lit').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-find-and-replace': CxFindAndReplace;
    }
}
