import type { Card, DashboardId, Dataset, Field, ParameterValueOrArray } from "@metabase/embedding-sdk-react/dist/frontend/src/metabase-types/api";
export type QueryBuilderMode = "view" | "notebook" | "dataset";
export type DatasetEditorTab = "query" | "metadata";
export type QueryBuilderQueryStatus = "idle" | "running" | "complete";
export type ForeignKeyReference = {
    status: number;
    value: number;
};
export interface QueryBuilderUIControls {
    isModifiedFromNotebook: boolean;
    isShowingDataReference: boolean;
    isShowingTemplateTagsEditor: boolean;
    isShowingNewbModal: boolean;
    isRunning: boolean;
    isQueryComplete: boolean;
    isShowingSummarySidebar: boolean;
    isShowingChartTypeSidebar: boolean;
    isShowingChartSettingsSidebar: boolean;
    isShowingQuestionDetailsSidebar: boolean;
    isShowingTimelineSidebar: boolean;
    isNativeEditorOpen: boolean;
    initialChartSetting: null;
    isShowingRawTable: boolean;
    queryBuilderMode: QueryBuilderMode;
    previousQueryBuilderMode: boolean;
    snippetCollectionId: number | null;
    datasetEditorTab: DatasetEditorTab;
    isShowingNotebookNativePreview: boolean;
    notebookNativePreviewSidebarWidth: number | null;
}
export interface QueryBuilderLoadingControls {
    showLoadCompleteFavicon: boolean;
    documentTitle: string;
    timeoutId: string;
}
export interface QueryBuilderDashboardState {
    dashboardId: DashboardId | null;
    isEditing: boolean;
}
export interface QueryBuilderState {
    uiControls: QueryBuilderUIControls;
    loadingControls: QueryBuilderLoadingControls;
    parentDashboard: QueryBuilderDashboardState;
    queryStatus: QueryBuilderQueryStatus;
    queryResults: Dataset[] | null;
    queryStartTime: number | null;
    cancelQueryDeferred: Promise<void> | null;
    card: Card | null;
    originalCard: Card | null;
    lastRunCard: Card | null;
    parameterValues: Record<string, ParameterValueOrArray>;
    zoomedRowObjectId: number | string | null;
    tableForeignKeyReferences: Record<number, ForeignKeyReference> | null;
    selectedTimelineEventIds: number[];
    metadataDiff: Record<string, Partial<Field>>;
    currentState: {
        card: Card;
        cardId?: number;
        serializedCard: string;
    } | null;
}
