import { NotificationService, SearchComponent } from '@alauda/ui';
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, TemplateRef } from '@angular/core';
import { Subject } from 'rxjs';
import { ApiGatewayService } from '../../api/public-api';
import { AuthorizationStateService } from '../../authorization/public-api';
import { TranslateService } from '../../translate/public-api';
import { ConnectionStatus } from '../constants';
import { TerminalExtraContentDirective } from '../terminal-group/component';
import { TerminalOption } from '../types';
import * as i0 from "@angular/core";
export declare const BIN_SH = "/bin/sh";
export declare const AUTO_SCRIPT_COMMENT = "# !!auto-script!!";
/**
 * For dispatching keyboard events automatically to xterm,
 * please view https://www.physics.udel.edu/~watson/scen103/ascii.html for reference.
 *
 * For instance, if you want to dispatch `Ctrl+C` to xterm, you should dispatch `\x03`(aka `\u0003`) to the socket.
 *
 * ```ts
 * socket.send('0' + encode('\u0003'))
 * ```
 */
export declare class TerminalComponent implements OnChanges, AfterViewInit, OnDestroy {
    private readonly apiGateway;
    private readonly authState;
    private readonly notification;
    private readonly translate;
    private readonly cdr;
    ConnectionStatus: typeof ConnectionStatus;
    option: TerminalOption;
    index: number;
    extraContent: TemplateRef<TerminalExtraContentDirective>;
    readonly connectionStatusChange: EventEmitter<ConnectionStatus>;
    readonly sendData: EventEmitter<string>;
    readonly socketReady: EventEmitter<WebSocket>;
    readonly fallbackShell: EventEmitter<string>;
    anchorRef: ElementRef<HTMLDivElement>;
    searchInputRef: SearchComponent;
    theme: 'light' | 'dark';
    searching: boolean;
    searchKeyword: string;
    coding: string;
    connectionStatus: ConnectionStatus;
    commandHasRun: boolean;
    private xterm;
    private searchAddon;
    private socket;
    private ping;
    socket$$: Subject<WebSocket>;
    constructor(apiGateway: ApiGatewayService, authState: AuthorizationStateService, notification: NotificationService, translate: TranslateService, cdr: ChangeDetectorRef);
    ngOnChanges(): void;
    ngAfterViewInit(): void;
    ngOnDestroy(): void;
    focus(): void;
    reconnect(): void;
    switchTheme(): void;
    openSearching(): void;
    closeSearching(): void;
    onShellKeyDown(event: KeyboardEvent): void;
    onSearchInputKeyDown(event: KeyboardEvent): void;
    findNext(): void;
    findPrevious(): void;
    private initXterm;
    private initFitAddon;
    private initSearchAddon;
    private initSocketConnection;
    private closeSocket;
    private resizeRemoteTerminal;
    private updateConnectionStatus;
    static ɵfac: i0.ɵɵFactoryDeclaration<TerminalComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<TerminalComponent, "acl-terminal", never, { "option": "option"; "index": "index"; "extraContent": "extraContent"; }, { "connectionStatusChange": "connectionStatusChange"; "sendData": "sendData"; "socketReady": "socketReady"; "fallbackShell": "fallbackShell"; }, never, never, false>;
}
