import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
import { CSSResultGroup, TemplateResult } from 'lit';

/**
 * @summary A web component for clamping text to a specific number of lines, allowing for single or multiline ellipsis.
 *
 * @csspart base - The component's base wrapper.
 * @csspart content - The component's content wrapper.
 */
export default class CxLineClamp extends CortexElement {
    static styles: CSSResultGroup;
    /**
     * The number of lines to clamp the text to.
     */
    lines: number;
    /**
     * Whether the content is open or not.
     */
    open: boolean;
    /**
     * Whether to show the show more button.
     */
    showMore: boolean;
    /**
     * The text to show on the show more button.
     */
    showMoreText: string;
    /**
     * The text to show on the show less button.
     */
    showLessText: string;
    /**
     * The tooltip to show. When this prop is set, the component will always show a tooltip.
     */
    tooltip: string;
    disabledTooltip: boolean;
    disabledHoverBridge: boolean;
    /** The flip boundary for the tooltip. */
    flipBoundary: Element | Element[];
    /** The shift boundary for the tooltip. */
    shiftBoundary: Element | Element[];
    /**
     * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
     * inside of the viewport.
     */
    placement: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
    /**
     * Whether the text is clamped or not.
     */
    isClamped: boolean;
    /**
     * The content to show in the tooltip when the text is clamped.
     */
    tooltipContent: string;
    /**
     * Whether the component has calculated the clamped state.
     */
    calculated: boolean;
    /**
     * The content element.
     */
    content: HTMLElement;
    /**
     * The tooltip element.
     */
    tooltipElement: HTMLElement;
    private mutationObserver;
    connectedUpdatedCallback(): void;
    disconnectedCallback(): void;
    updateTooltipContent(): Promise<void>;
    /**
     * Safari has a bug where -webkit-line-clamp with mixed content (text + elements)
     * can lose text nodes when tooltip hides. This forces a reflow to fix it.
     */
    private handleTooltipAfterHide;
    /**
     * This works by comparing the scrollHeight of the element to its clientHeight. When the text is clamped,
     * the scroll height extends below the element's visible area (clientHeight). When the text is not clamped,
     * the scroll height is the same as the clientHeight.
     */
    isTextClamped(element: Element): boolean;
    handleResize(): void;
    toggleShowingMore(): void;
    render(): TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-line-clamp': CxLineClamp;
    }
}
