import { Component, type ForwardedRef } from "react";
import { ResizableBox, type ResizableBoxProps } from "react-resizable";
import type { QueryModalType } from "../../../query_builder/constants";
import type Question from "../../../../metabase-lib/v1/Question";
import type NativeQuery from "../../../../metabase-lib/v1/queries/NativeQuery";
import type { CardId, Collection, DatabaseId, NativeQuerySnippet, ParameterId, TableId } from "../../../../metabase-types/api";
import { type CodeMirrorEditorProps, type CodeMirrorEditorRef } from "./CodeMirrorEditor";
import type { Features as SidebarFeatures } from "./NativeQueryEditorSidebar";
import type { SelectionRange } from "./types";
type OwnProps = typeof NativeQueryEditor.defaultProps & {
    question: Question;
    query: NativeQuery;
    nativeEditorSelectedText?: string;
    modalSnippet?: NativeQuerySnippet;
    viewHeight: number;
    isOpen?: boolean;
    isInitiallyOpen?: boolean;
    isNativeEditorOpen: boolean;
    isRunnable: boolean;
    isRunning: boolean;
    isResultDirty: boolean;
    isShowingDataReference: boolean;
    isShowingTemplateTagsEditor: boolean;
    isShowingSnippetSidebar: boolean;
    readOnly?: boolean;
    enableRun?: boolean;
    canChangeDatabase?: boolean;
    hasTopBar?: boolean;
    hasParametersList?: boolean;
    hasEditingSidebar?: boolean;
    sidebarFeatures?: SidebarFeatures;
    resizable?: boolean;
    resizableBoxProps?: Partial<Omit<ResizableBoxProps, "axis">>;
    editorContext?: "question";
    handleResize: () => void;
    setDatasetQuery: (query: NativeQuery) => Promise<Question>;
    runQuestionQuery: (opts?: {
        overrideWithQuestion?: Question;
        shouldUpdateUrl?: boolean;
    }) => void;
    setNativeEditorSelectedRange: (range: SelectionRange) => void;
    openDataReferenceAtQuestion: (id: CardId) => void;
    openSnippetModalWithSelectedText: () => void;
    insertSnippet: (snippet: NativeQuerySnippet) => void;
    setIsNativeEditorOpen?: (isOpen: boolean) => void;
    setParameterValue: (parameterId: ParameterId, value: string) => void;
    setParameterValueToDefault: (parameterId: ParameterId) => void;
    onOpenModal: (modalType: QueryModalType) => void;
    toggleDataReference: () => void;
    toggleTemplateTagsEditor: () => void;
    toggleSnippetSidebar: () => void;
    cancelQuery?: () => void;
    closeSnippetModal: () => void;
    onSetDatabaseId?: (id: DatabaseId) => void;
};
interface ExplicitSizeProps {
    width: number;
    height: number;
}
interface EntityLoaderProps {
    snippets?: NativeQuerySnippet[];
    snippetCollections?: Collection[];
}
type Props = OwnProps & ExplicitSizeProps & EntityLoaderProps & Omit<CodeMirrorEditorProps, "query"> & {
    forwardedRef?: ForwardedRef<HTMLDivElement>;
};
interface NativeQueryEditorState {
    initialHeight: number;
    isSelectedTextPopoverOpen: boolean;
    mobileShowParameterList: boolean;
    isPromptInputVisible: boolean;
}
export declare class NativeQueryEditor extends Component<Props, NativeQueryEditorState> {
    resizeBox: import("react").RefObject<HTMLDivElement & ResizableBox>;
    editor: import("react").RefObject<CodeMirrorEditorRef>;
    constructor(props: Props);
    static defaultProps: {
        isOpen: boolean;
        enableRun: boolean;
        canChangeDatabase: boolean;
        resizable: boolean;
        sidebarFeatures: {
            dataReference: boolean;
            variables: boolean;
            snippets: boolean;
            promptInput: boolean;
        };
    };
    UNSAFE_componentWillMount(): void;
    componentDidMount(): void;
    onChange: (queryText: string) => void;
    componentWillUnmount(): void;
    componentDidUpdate(prevProps: Props): void;
    handleKeyDown: (e: KeyboardEvent) => void;
    runQuery: () => void;
    focus(): void;
    toggleEditor: () => void;
    setDatabaseId: (databaseId: DatabaseId) => void;
    setTableId: (tableId: TableId) => void;
    setParameterIndex: (parameterId: ParameterId, parameterIndex: number) => void;
    handleFilterButtonClick: () => void;
    togglePromptVisibility: () => void;
    handleRightClickSelection: () => void;
    _updateSize(doc: string): void;
    handleQueryGenerated: (queryText: string) => void;
    formatQuery: () => Promise<void>;
    render(): import("react/jsx-runtime").JSX.Element;
}
declare const _default: any;
export default _default;
