import { RTEDropdownListGroup, RTEDropdownListItem, VegaRTECreateElementFunction, VegaRTERenderResult, VegaRTEToolbarRenderContext } from '../../interface';
import { VegaRTEToolbarButtonRenderer } from '../base-toolbar-button-renderer';
export declare type LanguageSelectedCallback = (selectedLanguage: string) => void;
/**
 * Toolbar button renderer for language selection in Vega Rich Text Editor.
 *
 * Each {@link HTMLVegaRichTextEditorElement} that uses a language extension receives its
 * **own** instance of this renderer, registered in the per-host map inside
 * {@link RTEDTORendererManager} via {@link VegaRTEExtension#prepareBeforeLoad}.  Because
 * every editor has a dedicated renderer, all state (label DOM ref, selected language, and
 * the language-change callback) is held in plain instance fields — no WeakMaps or shared
 * singletons are required.
 */
export declare class RTELanguageToolbarButtonRenderer extends VegaRTEToolbarButtonRenderer {
  private languageList;
  private languageChangeCallback;
  private selectedLanguage;
  private labelRef;
  constructor(languageList: (RTEDropdownListItem | RTEDropdownListGroup)[], languageChangeCallback: LanguageSelectedCallback, selectedLanguage?: string);
  /**
   * Updates the selected language and refreshes the button label text in-place,
   * without requiring a full re-render of the toolbar.
   *
   * @param {string} language The language key to set as selected.
   */
  setSelectedLanguage(language: string): void;
  /**
   * The source edit mode does not affect the language button visibility.
   *
   * @returns {boolean} True if the button is hidden, false otherwise.
   */
  isHidden(): boolean;
  /**
   * @inheritDoc
   */
  render(createElement: VegaRTECreateElementFunction, editorContext: VegaRTEToolbarRenderContext): VegaRTERenderResult;
  /**
   * Override to capture the rendered label element ref so that
   * {@link setSelectedLanguage} can update the button text without a full re-render.
   *
   * @inheritDoc
   */
  protected renderButtonLabel(h: VegaRTECreateElementFunction, editorContext: VegaRTEToolbarRenderContext, label: string): VegaRTERenderResult;
  /**
   * Handles the button click event. No need this method for language button.
   *
   * @param {VegaRTEToolbarRenderContext} editorContext - The render context for the editor.
   */
  protected handleButtonClick(editorContext: VegaRTEToolbarRenderContext): void;
  /**
   * Handles the language selection event.
   * Because each editor has its own renderer instance, the language-change callback
   * is stored directly on this instance — no indirect context lookup is needed.
   *
   * @param {string} itemKey - The key of the selected language item.
   */
  protected handleDropdownClick: (itemKey: string) => void;
  /**
   * Gets the label of a language by its key.
   *
   * @param {string} key The language key to look up.
   * @returns {string} The label of the language, or the key if not found.
   */
  private getLanguageLabelByKey;
}
