import { LitElement, PropertyValues, TemplateResult } from 'lit';
import '../../../md/chip/ui-chip.js';
export interface MentionSuggestion {
    /** Unique identifier for the suggestion */
    id: string;
    /** Main label/headline displayed */
    label: string;
    /** Supporting description text */
    description?: string;
    /** Suffix text (e.g., role, department) */
    suffix?: string;
    /** Additional data associated with the suggestion */
    data?: Record<string, unknown>;
}
export interface MentionInsertEvent {
    /** The inserted mention suggestion */
    suggestion: MentionSuggestion;
    /** The text that triggered the mention (e.g., "@john") */
    trigger: string;
    /** The position where the mention was inserted */
    position: number;
}
export interface MentionRemoveEvent {
    /** The removed mention suggestion */
    suggestion: MentionSuggestion;
    /** The position where the mention was removed from */
    position: number;
}
/**
 * A material design textarea component that supports @mentions with suggestions.
 *
 * Features:
 * - Material Design styling
 * - @mention triggers with customizable suggestions
 * - Inline pill/chip rendering for mentions
 * - Proper caret management
 * - Keyboard navigation for suggestions
 * - Overflow container support
 * - Generic design for extensibility
 * - Accessibility support
 *
 * @fires mention-insert - When a mention is inserted
 * @fires mention-remove - When a mention is removed
 * @fires input - When the input value changes
 * @fires change - When the input loses focus and value has changed
 */
export default class MentionTextArea extends LitElement {
    /**
     * Shadow root configuration for the component.
     * Uses 'open' mode for accessibility and delegates focus to enable proper focus management.
     */
    static shadowRootOptions: ShadowRootInit;
    /**
     * The label text displayed as placeholder/floating label
     */
    accessor label: string;
    /**
     * Supporting text displayed below the input
     */
    accessor supportingText: string;
    /**
     * Whether the component is disabled
     */
    accessor disabled: boolean;
    /**
     * Whether the component is in an invalid state
     */
    accessor invalid: boolean;
    /**
     * The name attribute for form integration
     */
    accessor name: string;
    /**
     * Whether the input is required
     */
    accessor required: boolean;
    /**
     * Placeholder text shown when input is empty
     */
    accessor placeholder: string;
    get value(): string;
    set value(newValue: string);
    /**
     * Available suggestions for mentions
     */
    accessor suggestions: MentionSuggestion[];
    /**
     * Character that triggers mention suggestions (default: '@')
     */
    accessor mentionTrigger: string;
    /**
     * Minimum characters after trigger to show suggestions
     */
    accessor minQueryLength: number;
    private accessor editorElement;
    private accessor suggestionsPopover;
    private accessor isShowingSuggestions;
    private accessor filteredSuggestions;
    private accessor selectedSuggestionIndex;
    private accessor hasContent;
    private accessor isLabelFloating;
    private accessor isEditorFocus;
    private currentMentionQuery;
    private currentMentionStart;
    private mentionMap;
    private mutationObserver?;
    private _value;
    /**
     * A read-only list of the names of the fields currently mentioned in the textarea.
     */
    get mentions(): string[];
    connectedCallback(): void;
    disconnectedCallback(): void;
    firstUpdated(): void;
    willUpdate(changedProperties: PropertyValues): void;
    /**
     * Get the plain text content without field references
     * @returns The plain text content with field names instead of references
     */
    getPlainText(): string;
    /**
     * Sets the caret position at the beginning of a specific text node
     */
    private setCaretPositionAtTextNode;
    /**
     * Synchronizes the value property from the editor content
     */
    private syncValueFromEditor;
    /**
     * Gets the value from editor content, converting chips to @{mention} format
     */
    private getValueFromEditor;
    /**
     * Synchronizes the editor content from the value property
     */
    private syncEditorFromValue;
    /**
     * Parses value string into text and mention fragments
     */
    private parseValueToFragments;
    /**
     * Creates a mention chip element
     */
    private createMentionChip;
    /**
     * Updates content state flags
     */
    private updateContentState;
    /**
     * Handles input events in the editor
     */
    private handleEditorInput;
    /**
     * Handles keydown events in the editor
     */
    private handleEditorKeyDown;
    /**
     * Handles keydown events when suggestions are visible
     */
    private handleSuggestionKeyDown;
    /**
     * Handles focus events
     */
    private handleEditorFocus;
    /**
     * Handles blur events
     */
    private handleEditorBlur;
    private handleEditorPaste;
    /**
     * Checks if the current caret position indicates a mention trigger
     */
    private checkForMentionTrigger;
    private walkerNodeFilter;
    /**
     * Gets the global text position within the editor for a position within a text node
     */
    private getGlobalTextPosition;
    /**
     * Finds the DOM node and offset that corresponds to a global text position
     */
    private findNodeAtGlobalPosition;
    /**
     * Shows the suggestions popover
     */
    private showSuggestions;
    /**
     * Hides the suggestions popover
     */
    private hideSuggestions;
    /**
     * Updates filtered suggestions based on current query
     */
    private updateFilteredSuggestions;
    /**
     * Positions the suggestions popover using the Popover API anchor positioning
     */
    private positionSuggestions;
    /**
     * Selects a suggestion and inserts it as a mention
     */
    private selectSuggestion;
    /**
     * Removes a mention chip
     */
    private removeMention;
    /**
     * Gets the text position of an element
     */
    private getElementPosition;
    /**
     * Handles clicking on a suggestion
     */
    private handleSuggestionClick;
    /**
     * Renders a suggestion item
     */
    private renderSuggestion;
    /**
     * Renders the suggestions popover
     */
    private renderSuggestions;
    render(): TemplateResult;
}
//# sourceMappingURL=MentionTextArea.d.ts.map