import React from 'react';
import { Tab as KuiTab, TabState } from '@kui-shell/core';
import SessionInitStatus from './SessionInitStatus';
import ScrollableTerminal, { TerminalOptions } from '../Views/Terminal/ScrollableTerminal';
import { MutabilityState } from './MutabilityContext';
interface WithTabUUID {
    uuid: string;
}
interface WithTab<T extends KuiTab | React.RefObject<KuiTab> = React.RefObject<KuiTab>> {
    tab: T;
    tabClassList: Record<string, boolean>;
}
export type TabContentOptions = TerminalOptions & {
    /** [Optional] elements to be placed below the Terminal */
    bottom?: React.ReactElement<WithTabUUID & WithTab<KuiTab>>;
    onTabReady?: (tab: KuiTab) => void;
    willSetTitle?: (uuid: string, title: string) => void;
};
type Props = TabContentOptions & WithTabUUID & React.PropsWithChildren<{
    active: boolean;
    state: TabState;
    tabTitle?: string;
    initialCommandLine?: string;
}>;
type State = Partial<WithTab> & {
    active: boolean;
    sessionInit: SessionInitStatus;
    sessionInitError?: Error;
    showSessionInitDone: boolean;
    /** Terminal readiness */
    isTerminalReady: boolean;
    /** Does this tab have a left strip layout? */
    hasLeftStrip: boolean;
    /** Does this tab have a right strip layout? */
    hasRightStrip: boolean;
    /** grab a ref (below) so that we can maintain focus */
    _terminal: React.RefObject<ScrollableTerminal>;
    mutability: MutabilityState;
};
/**
 *
 * TabContent
 * ----------------  <Tab/> from here down
 * | ST  |        |
 * |     |        |
 * |     |        |
 * |     |        |
 * |     |        |
 * |     |        |
 * ----------------
 *  ST: <ScrollableTerminal/>
 *
 */
export default class TabContent extends React.PureComponent<Props, State> {
    private _firstRenderDone;
    private readonly cleaners;
    /** switching back or away from this tab */
    private activateHandlers;
    private readonly toggleEditMode;
    private readonly setEditMode;
    constructor(props: Props);
    static getDerivedStateFromProps(props: Props, state: State): State;
    static delayedFocus(state: State, delayMillis?: number): void;
    /**
     * This method fires `this.props.onTabReady` after *both* the tab is
     * ready and the terminal is ready.
     */
    private maybeFireTabReady;
    componentDidMount(): void;
    private execCommand;
    private onOffline;
    private static onSessionInitError;
    private oneTimeInit;
    private initTab;
    componentWillUnmount(): void;
    private defaultLoading;
    /** Reset any notion of left strip etc. */
    private readonly _resetSplitLayout;
    /** Enter/exit mode where one split is displayed along the left */
    private readonly _toggleLeftStripMode;
    /** Enter/exit mode where one split is displayed along the right */
    private readonly _toggleRightStripMode;
    /** Toggle attribute on Tab DOM */
    private readonly _toggleAttribute;
    /** Request to clear the contents of the ScrollableTerminal */
    private readonly _onClear;
    /** Terminal is ready for action */
    private readonly _onTerminalReady;
    private terminal;
    /** Use client-provided (or default) proxy disconnected notice, if warranted */
    private proxyDisconnectNotice;
    private graft;
    /** Graft on the REPL focus management */
    private children;
    /** Graft on the tab uuid */
    private bottom;
    /** Construct the `className` property of the tab element */
    private tabClassName;
    private body;
    render(): JSX.Element;
}
export {};
