import { EventEmitter } from '../../stencil-public-runtime';
import { CodeExpression } from '@stencila/schema';
import { CodeComponent, CodeVisibilityEvent, DiscoverExecutableLanguagesEvent } from '../code/codeTypes';
import { FileFormat, FileFormatMap } from '../editor/languageUtils';
/**
 * @slot text - The source code of the `CodeChunk`. Corresponds to the `text` field in the Stencila `CodeExpression` Schema.
 * @slot output - A single output element. Corresponds to the `output` field in the Stencila `CodeExpression` Schema.
 */
export declare class CodeExpressionComponent implements CodeComponent<CodeExpression> {
  private el;
  private emptyOutputMessage;
  private hoverTimeOut;
  private hoverStartedAt;
  private outputSlot;
  /**
   * A callback function to be called with the value of the `CodeExpression` node when executing the `CodeExpression`.
   */
  executeHandler?: (codeExpression: CodeExpression) => Promise<CodeExpression>;
  /**
   * Disallow editing of the editor contents when set to `true`
   */
  readOnly: boolean;
  /**
   * Programming language of the CodeExpression
   */
  programmingLanguage: string;
  /**
   * List of all supported programming languages
   */
  languageCapabilities: FileFormatMap;
  /**
   * List of programming languages that can be executed in the current context
   */
  executableLanguages: FileFormatMap;
  onDiscoverExecutableLanguages({ detail, }: DiscoverExecutableLanguagesEvent): void;
  /**
   * Event emitted when the language of the editor is changed.
   */
  languageChange: EventEmitter<FileFormat>;
  /**
   * Function to call when the user selects a new language from the language picker dropdown.
   */
  private onSelectLanguage;
  /**
   * Stencila CodeExpression node to render
   */
  codeExpression?: CodeExpression;
  hover: boolean;
  isCodeVisible: boolean;
  isOutputEmpty: boolean;
  executeCodeState: 'INITIAL' | 'PENDING' | 'RESOLVED';
  private getOutputSlotContents;
  private checkIfEmpty;
  componentWillLoad(): void;
  onAllCodeVisibilityChange(event: CodeVisibilityEvent): void;
  /**
   * Returns the text contents from the inline code editor
   */
  getTextContents(): Promise<string>;
  /**
   * Returns the `CodeExpression` node with the updated `text` contents from the editor.
   */
  getContents(): Promise<CodeExpression>;
  private setCodeVisibility;
  private toggleCodeVisibility;
  private selectTextSlot;
  /**
   * Event emitted when the source code of the `CodeExpression` node is changed.
   */
  contentChange: EventEmitter<string>;
  private contentChangeHandler;
  private handleKeyDown;
  private onExecuteHandler;
  /**
   * Run the `CodeExpression`
   */
  execute(): Promise<CodeExpression>;
  private executeRef;
  private dividerArrow;
  private onMouseOutHandler;
  private addHoverState;
  private removeHoverState;
  private generateContent;
  render(): HTMLElement;
}
