import React from 'react';
import { Tab as KuiTab } from '@kui-shell/core/mdist/api/Tab';
import SplitPosition from '../SplitPosition';
import { InputOptions } from './Input';
import { BlockModel } from './BlockModel';
export type BlockViewTraits = {
    /** number of splits currently in this tab */
    nSplits?: number;
    isExperimental?: boolean;
    isFocused?: boolean;
    isWidthConstrained?: boolean;
    /** Handler for: User clicked to focus on this block */
    willFocusBlock?: (evt: React.SyntheticEvent) => void;
    /** Handler for <li> focus */
    onFocus?: (evt: React.FocusEvent) => void;
};
export interface BlockOperationTraits {
    /** Remove the enclosing block */
    willRemove?: (evt: React.SyntheticEvent, idx?: number) => void;
    /** Is the block executable? e.g. re-editable and re-runable */
    isExecutable?: boolean;
}
type Props = InputOptions & React.PropsWithChildren<{
    /** block ordinal index */
    idx: number;
    /** block ordinal index to be displayed to the user */
    displayedIdx?: number;
    /** block model */
    model: BlockModel;
    /** tab UUID */
    uuid: string;
    /** tab model */
    tab: KuiTab;
    noActiveInput?: boolean;
    /** Position of the enclosing split. Default: SplitPosition.default */
    splitPosition?: SplitPosition;
    noOutput?: boolean;
    onOutputRender?: () => void;
    willUpdateCommand?: (idx: number, command: string) => void;
}> & BlockViewTraits;
interface State {
    _block?: HTMLElement;
    /** Is the Input element focused? */
    isFocused: boolean;
    /** Does a child want to us to be maximized? */
    isMaximized: boolean;
}
export default class Block extends React.PureComponent<Props, State> {
    /** grab a ref to the Input to help with maintaining focus */
    private _input;
    constructor(props: Props);
    /** Owner wants us to focus on the current prompt */
    doFocus(): void;
    inputValue(): string;
    /** Child wants to maximize/restore */
    private willChangeSize;
    private readonly _willChangeSize;
    private onOutputRender;
    private readonly _onOutputRender;
    private output;
    private customInput;
    private input;
    /**
     * For Active or Empty blocks, just show the <Input/>, otherwise
     * wrap the <Input/>-<Output/> pair.
     *
     */
    render(): JSX.Element;
}
export {};
