/// <reference types="react" />

import { ActionIconProps } from '@mantine/core';
import type { ButtonProps as ButtonProps_2 } from '@mantine/core';
import { ComponentType } from 'react';
import { CSSProperties } from 'react';
import type { HTMLAttributes } from 'react';
import { JSX as JSX_2 } from 'react';
import { JSX as JSX_3 } from 'react/jsx-runtime';
import type { MantineColor } from '@mantine/core/lib/core';
import { MenuProps } from '@mantine/core';
import type { MouseEventHandler } from 'react';
import { NamedExoticComponent } from 'react';
import { PopoverProps } from '@mantine/core';
import type { PropsWithChildren } from 'react';
import { ReactNode } from 'react';
import { StackProps } from '@mantine/core';

/**
 * A navigation button that returns to the previous view.
 * Only visible when rendered within the {@link InteractiveDashboardProps.renderDrillThroughQuestion} prop.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const BackButton: ({ ...actionIconProps }: InteractiveQuestionBackButtonProps) => JSX_3.Element | null;

/**
 * @interface
 * @expand
 */
export declare type BaseInteractiveQuestionProps = InteractiveQuestionQuestionIdProps & {
    /**
     * The children of the MetabaseProvider component.s
     */
    children?: ReactNode;
    plugins?: InteractiveQuestionProviderProps["componentPlugins"];
} & Pick<InteractiveQuestionProviderProps, "onBeforeSave" | "onSave" | "entityTypes" | "isSaveEnabled" | "initialSqlParameters" | "withDownloads" | "targetCollection" | "onRun">;

/**
 * @inline
 */
declare type BaseMetabaseAuthConfig = {
    metabaseInstanceUrl: string;
};

/**
 * A set of badges for managing data groupings (breakouts).
 * Uses question context for breakout functionality.
 *
 * @function
 * @category InteractiveQuestion
 */
declare const Breakout: () => JSX_3.Element | null;

/**
 * Dropdown button for the Breakout component.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const BreakoutDropdown: (props: InteractiveQuestionBreakoutDropdownProps) => JSX_3.Element | null;

export declare type ButtonProps = ButtonProps_2 & {
    animate?: boolean;
    highlightOnHover?: boolean;
    type?: "button" | "submit";
} & HTMLAttributes<HTMLButtonElement>;

export declare type ChartColor = string | {
    base: string;
    /** Lighter variation of the base color */
    tint?: string;
    /** Darker variation of the base color */
    shade?: string;
};

/**
 * Dropdown for selecting the visualization type (bar chart, line chart, table, etc.).
 * Automatically updates to show recommended visualization types for the current data.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const ChartTypeDropdown: ({ ...menuProps }: InteractiveQuestionChartTypeDropdownProps) => JSX_3.Element;

/**
 * Detailed chart type selection interface with recommended visualization options.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const ChartTypeSelector: ({ ...stackProps }: InteractiveQuestionChartTypeSelectorProps) => JSX_3.Element;

/**
 * A component that allows you to browse collections and their items.
 *
 * @function
 * @category CollectionBrowser
 */
export declare const CollectionBrowser: (props: CollectionBrowserProps) => ReactNode;

export declare type CollectionBrowserListColumns = "type" | "name" | "lastEditedBy" | "lastEditedAt";

/**
 * @interface
 * @expand
 * @category CollectionBrowser
 */
export declare type CollectionBrowserProps = {
    /**
     * The numerical ID of the collection, "personal" for the user's personal collection, or "root" for the root collection. You can find this ID in the URL when accessing a collection in your Metabase instance. For example, the collection ID in `http://localhost:3000/collection/1-my-collection` would be `1`. Defaults to "personal"
     */
    collectionId?: SdkCollectionId;
    /**
     * The number of items to display per page. The default is 25.
     */
    pageSize?: number;
    /**
     * The types of entities that should be visible. If not provided, all entities will be shown.
     */
    visibleEntityTypes?: UserFacingEntityName[];
    /**
     * The columns to display in the collection items table. If not provided, all columns will be shown.
     */
    visibleColumns?: CollectionBrowserListColumns[];
    /**
     * A component to display when there are no items in the collection.
     */
    EmptyContentComponent?: ComponentType | null;
    /**
     * A function to call when an item is clicked.
     */
    onClick?: (item: MetabaseCollectionItem) => void;
} & CommonStylingProps;

/**
 * @inline
 */
declare type ColorCssVariableOrString = `var(--mb-color-${ColorName})` | string;

declare type ColorName = keyof ColorPalette;

declare type ColorPalette = Partial<Record<keyof typeof colors, string>>;

declare const colors: {
    brand: string;
    summarize: string;
    filter: string;
    accent0: string;
    accent1: string;
    accent2: string;
    accent3: string;
    accent4: string;
    accent5: string;
    accent6: string;
    accent7: string;
    "accent-gray": string;
    "accent-gray-light": string;
    "accent-gray-dark": string;
    "admin-navbar": string;
    white: string;
    success: string;
    danger: string;
    error: string;
    warning: string;
    "text-dark": string;
    "text-medium": string;
    "text-light": string;
    "text-white": string;
    "text-secondary-inverse": string;
    "bg-black": string;
    "bg-dark": string;
    "bg-medium": string;
    "bg-light": string;
    "bg-white": string;
    "bg-yellow": string;
    "bg-night": string;
    "bg-error": string;
    shadow: string;
    border: string;
    "saturated-blue": string;
    "saturated-green": string;
    "saturated-purple": string;
    "saturated-red": string;
    "saturated-yellow": string;
};

/**
 * @inline
 */
declare type CommonStylingProps = {
    /**
     * A custom class name to be added to the root element.
     */
    className?: string;
    /**
     * A custom style object to be added to the root element.
     */
    style?: CSSProperties;
};

/**
 * Creates a dashboard
 *
 * @function
 * @category CreateDashboardModal
 */
export declare const CreateDashboardModal: (props: CreateDashboardModalProps) => ReactNode;

/**
 * @expand
 * @category CreateDashboardModal
 */
export declare interface CreateDashboardModalProps {
    /**
     * Initial collection in which to create a dashboard. You can use predefined system values like `root` or `personal`.
     */
    initialCollectionId?: SdkCollectionId;
    /**
     * Whether the modal is open or not.
     */
    isOpen?: boolean;
    /**
     * Handler to react on dashboard creation.
     */
    onCreate: (dashboard: MetabaseDashboard) => void;
    /**
     * Handler to close modal component
     */
    onClose?: () => void;
}

declare interface CreateDashboardProperties {
    /**
     * Dashboard title
     */
    name: string;
    /**
     * Dashboard description
     */
    description: string | null;
}

/**
 * @interface
 * @category CreateDashboardModal
 */
export declare type CreateDashboardValues = Omit<CreateDashboardProperties, "collection_id"> & {
    /**
     * Collection in which to create a new dashboard. You can use predefined system values like `root` or `personal`.
     */
    collectionId: SdkCollectionId;
};

/**
 * @function
 * @category CreateQuestion
 * @deprecated Use `<InteractiveQuestion questionId="new" />` instead.
 * */
export declare const CreateQuestion: (props?: CreateQuestionProps) => JSX_3.Element;

/**
 * @interface
 * @expand
 * @category CreateQuestion
 */
export declare type CreateQuestionProps = Omit<Partial<BaseInteractiveQuestionProps>, "questionId" | "children">;

export declare type CustomDashboardCardMenuItem = ({ question, }: {
    question?: MetabaseQuestion;
}) => DashCardMenuItem;

export declare type DashboardCardCustomMenuItem = {
    withDownloads?: boolean;
    withEditLink?: boolean;
    customItems?: (DashCardMenuItem | CustomDashboardCardMenuItem)[];
};

export declare type DashboardCardMenuCustomElement = ({ question, }: {
    question: MetabaseQuestion;
}) => ReactNode;

declare type DashboardEventHandlersProps = {
    /**
     * Callback that is called when the dashboard is loaded.
     */
    onLoad?: (dashboard: MetabaseDashboard | null) => void;
    /**
     * Callback that is called when the dashboard is loaded without cards.
     */
    onLoadWithoutCards?: (dashboard: MetabaseDashboard | null) => void;
};

export declare type DashCardMenuItem = {
    /**
     * Icon name
     */
    iconName: IconName;
    /**
     * Item label
     **/
    label: string;
    /**
     * Item children
     */
    children?: ReactNode;
    /**
     * Key of `theme.colors` or any valid CSS color
     **/
    color?: MantineColor;
    /**
     * Determines whether the menu should be closed when the item is clicked, overrides `closeOnItemClick` prop on the `Menu` component
     **/
    closeMenuOnClick?: boolean;
    /**
     * Section displayed on the left side of the label
     **/
    leftSection?: ReactNode;
    /**
     * Section displayed on the right side of the label
     **/
    rightSection?: ReactNode;
    /**
     * Disables item
     **/
    disabled?: boolean;
    /**
     * Click handler
     */
    onClick: () => void;
};

/**
 * Makes every property in the object optional.
 *
 * @inline
 **/
declare type DeepPartial<T> = {
    [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
};

/**
 * Defines a Metabase auth config.
 *
 * @function
 * @category MetabaseProvider
 */
export declare const defineMetabaseAuthConfig: (config: MetabaseAuthConfig) => MetabaseAuthConfig;

export declare const defineMetabaseTheme: (theme: MetabaseTheme) => MetabaseTheme;

/**
 * Provides a UI widget for downloading data in different formats (`CSV`, `XLSX`, `JSON`, and `PNG` depending on the visualization).
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const DownloadWidget: (props: InteractiveQuestionDownloadWidgetProps) => JSX_3.Element | null;

/**
 * Provides a button that contains a dropdown that shows the `DownloadWidget`.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const DownloadWidgetDropdown: ({ ...popoverProps }: InteractiveQuestionDownloadWidgetDropdownProps) => JSX_3.Element;

/**
 * Props for the drill-through question
 *
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type DrillThroughQuestionProps = Omit<BaseInteractiveQuestionProps, "questionId"> & InteractiveQuestionDefaultViewProps;

/**
 * A dashboard component with the features available in the `InteractiveDashboard` component, as well as the ability to add and update questions, layout, and content within your dashboard.
 *
 * @function
 * @category InteractiveDashboard
 * @param props
 */
export declare const EditableDashboard: ({ dashboardId: dashboardIdProp, initialParameters, withDownloads, drillThroughQuestionHeight, plugins, onLoad, onLoadWithoutCards, className, style, drillThroughQuestionProps, }: EditableDashboardProps) => JSX_3.Element;

/**
 * @interface
 * @expand
 * @category InteractiveDashboard
 */
export declare type EditableDashboardProps = {
    /**
     * Height of a question component when drilled from the dashboard to a question level.
     */
    drillThroughQuestionHeight?: number;
    /**
     * Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.
     */
    plugins?: MetabasePluginsConfig;
    /**
     * Props for the drill-through question
     */
    drillThroughQuestionProps?: DrillThroughQuestionProps;
} & Omit<SdkDashboardDisplayProps, "withTitle" | "hiddenParameters"> & DashboardEventHandlersProps;

/**
 * Advanced query editor that provides full access to question configuration.
 * Includes filtering, aggregation, custom expressions, and joins.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const Editor: ({ onApply, hasVisualizeButton, }: InteractiveQuestionEditorProps) => JSX_3.Element | undefined;

/**
 * Toggle button for showing/hiding the Editor interface.
 * In custom layouts, the `EditorButton` _must_ have an {@link InteractiveQuestionEditorButtonProps.onClick}` handler or the button won't do anything when clicked.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const EditorButton: ({ isOpen, ...actionIconProps }: InteractiveQuestionEditorButtonProps) => false | JSX_3.Element | undefined;

/**
 * `question` only works on multi-stage data picker, not the simple data picker.
 * The reason being that we want to streamline user experience for simple embedding
 * use cases, but `question` was later added to support users who are used to
 * selecting Saved questions in interactive embedding, so this is special case.
 */
export declare type EmbeddingEntityType = "model" | "table" | "question";

export declare type EntityTypeFilterKeys = "table" | "model";

/**
 * A set of interactive filter badges that allow adding, editing, and removing filters.
 * Displays current filters as badges with an "Add another filter" option.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const Filter: ({ withColumnItemIcon, }: InteractiveQuestionFilterProps) => JSX_3.Element;

/**
 * A dropdown button for the Filter component.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const FilterDropdown: ({ withColumnItemIcon, }: InteractiveQuestionFilterDropdownProps) => JSX_3.Element | null;

/**
 * @inline
 */
declare type FlexibleSizeProps = PropsWithChildren<CommonStylingProps & {
    /**
     * A number or string specifying a CSS size value that specifies the width of the component
     */
    width?: CSSProperties["width"];
    /**
     * A number or string specifying a CSS size value that specifies the height of the component
     */
    height?: CSSProperties["height"];
}>;

export declare type IconName = _IconName;

/**
 * Inline wrapper to properly display the `IconName` type without referencing the `internal` type
 *
 * @hidden
 * @inline
 */
declare type _IconName = IconName_2;

/**
 * We need a standalone type to prevent adding the `Icons` object (as a type) into `index.d.ts` of Embedding SDK dist
 */
declare type IconName_2 = "add" | "add_column" | "add_data" | "add_folder" | "add_row" | "add_to_dash" | "ai" | "alert" | "alert_filled" | "alert_confirm" | "archive" | "area" | "attachment" | "arrow_up" | "arrow_down" | "arrow_left" | "arrow_left_to_line" | "arrow_right" | "arrow_split" | "audit" | "badge" | "bar" | "bell" | "birthday" | "bookmark" | "bookmark_filled" | "bolt" | "bolt_filled" | "breakout" | "bubble" | "burger" | "calendar" | "check" | "check_filled" | "chevrondown" | "chevronleft" | "chevronright" | "chevronup" | "click" | "clipboard" | "clock" | "clone" | "close" | "cloud" | "cloud_filled" | "compare" | "combine" | "connections" | "contract" | "copy" | "curved" | "database" | "dash" | "dashboard" | "curve" | "document" | "download" | "dyno" | "edit_document" | "ellipsis" | "embed" | "empty" | "enter_or_return" | "expand" | "expand_arrow" | "extract" | "eye" | "eye_crossed_out" | "eye_outline" | "field" | "fields" | "filter" | "filter_plus" | "bug" | "format_code" | "formula" | "function" | "funnel" | "funnel_outline" | "folder" | "folder_filled" | "gauge" | "gear" | "gem" | "globe" | "grabber" | "grid" | "group" | "google" | "google_drive" | "google_sheet" | "history" | "home" | "horizontal_bar" | "hourglass" | "info" | "info_filled" | "info_outline" | "insight" | "int" | "io" | "join_full_outer" | "join_inner" | "join_left_outer" | "join_right_outer" | "index" | "key" | "label" | "ldap" | "learn" | "lightbulb" | "link" | "line" | "lines" | "lineandbar" | "line_style_dashed" | "line_style_dotted" | "line_style_solid" | "list" | "location" | "lock" | "lock_filled" | "mail" | "mail_filled" | "metabot" | "metabot_sad" | "metric" | "model" | "model_with_badge" | "moon" | "move" | "move_card" | "new_folder" | "notebook" | "number" | "palette" | "pause" | "pencil" | "pencil_lines" | "permissions_limited" | "person" | "pie" | "pin" | "pinmap" | "pivot_table" | "play" | "play_outlined" | "popover" | "popular" | "progress" | "pulse" | "recents" | "revert" | "sankey" | "share" | "split" | "sql" | "subscription" | "straight" | "stepped" | "sort" | "sort_arrows" | "sum" | "sync" | "question" | "redo" | "return" | "reference" | "refresh" | "refresh_downstream" | "rocket" | "ruler" | "search" | "section" | "segment" | "shield" | "sidebar_closed" | "sidebar_open" | "slack" | "slack_colorized" | "smartscalar" | "snippet" | "sparkles" | "star_filled" | "star" | "stop" | "store" | "string" | "sun" | "t-shirt" | "tab" | "table" | "table2" | "time_history" | "trash" | "trash_filled" | "triangle_left" | "triangle_right" | "unarchive" | "undo" | "unknown" | "unpin" | "unsubscribe" | "upload" | "variable" | "verified" | "official_collection" | "verified_filled" | "view_archive" | "warning" | "warning_round_filled" | "waterfall" | "webhook" | "10k" | "1m" | "zoom_in" | "zoom_out" | "scalar" | "cake" | "external" | "table_spaced" | "collection" | "beaker" | "eye_filled";

/**
 * A dashboard component with drill downs, click behaviors, and the ability to view and click into questions.
 *
 * @function
 * @category InteractiveDashboard
 */
export declare const InteractiveDashboard: (props: InteractiveDashboardProps) => ReactNode;

/**
 * @interface
 * @expand
 * @category InteractiveDashboard
 */
export declare type InteractiveDashboardProps = {
    /**
     * Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.
     */
    plugins?: MetabasePluginsConfig;
    /**
     * A custom React component to render the question layout.
     * Use namespaced InteractiveQuestion components to build the layout.
     */
    renderDrillThroughQuestion?: () => ReactNode;
    /**
     * Height of a question component when drilled from the dashboard to a question level.
     */
    drillThroughQuestionHeight?: CSSProperties["height"];
    /**
     * Props of a question component when drilled from the dashboard to a question level.
     */
    drillThroughQuestionProps?: DrillThroughQuestionProps;
} & SdkDashboardDisplayProps & DashboardEventHandlersProps;

/**
 * A component that renders an interactive question.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
export declare const InteractiveQuestion: (({ questionId, withResetButton, title, plugins, height, width, className, style, children, onBeforeSave, onSave, entityTypes, isSaveEnabled, targetCollection, withChartTypeSelector, withDownloads, initialSqlParameters, onRun, }: InteractiveQuestionProps) => JSX.Element | null) & {
    BackButton: typeof BackButton;
    Filter: typeof Filter;
    FilterDropdown: typeof FilterDropdown;
    ResetButton: typeof QuestionResetButton;
    Title: typeof Title;
    Summarize: typeof Summarize;
    SummarizeDropdown: typeof SummarizeDropdown;
    /** @deprecated Use `InteractiveQuestion.Editor` instead */
    Notebook: typeof Editor;
    Editor: typeof Editor;
    /** @deprecated Use `InteractiveQuestion.EditorButton` instead */
    NotebookButton: typeof EditorButton;
    EditorButton: typeof EditorButton;
    QuestionVisualization: typeof QuestionVisualization;
    VisualizationButton: typeof VisualizationButton;
    SaveQuestionForm: typeof SdkSaveQuestionForm;
    SaveButton: typeof SaveButton;
    ChartTypeSelector: typeof ChartTypeSelector;
    ChartTypeDropdown: typeof ChartTypeDropdown;
    QuestionSettings: typeof QuestionSettings;
    QuestionSettingsDropdown: typeof QuestionSettingsDropdown;
    Breakout: typeof Breakout;
    BreakoutDropdown: typeof BreakoutDropdown;
    DownloadWidget: typeof DownloadWidget;
    DownloadWidgetDropdown: typeof DownloadWidgetDropdown;
};

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionBackButtonProps = Omit<ActionIconProps & HTMLAttributes<HTMLButtonElement>, "noLink" | "onClick">;

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionBreakoutDropdownProps = Omit<PopoverProps, "children" | "onClose" | "opened">;

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionChartTypeDropdownProps = MenuProps;

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionChartTypeSelectorProps = StackProps;

declare type InteractiveQuestionConfig = {
    /**
     * An array that specifies which entity types are available in the data picker
     */
    entityTypes?: EmbeddingEntityType[];
    /**
     * Whether to show the save button.
     **/
    isSaveEnabled?: boolean;
    /**
     * Initial values for the SQL parameters.
     **/
    initialSqlParameters?: SqlParameterValues;
    /**
     * Enables the ability to download results in the interactive question.
     */
    withDownloads?: boolean;
    /**
     * The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.
     */
    targetCollection?: SdkCollectionId;
    /**
     * Additional mapper function to override or add drill-down menu
     */
    componentPlugins?: MetabasePluginsConfig;
    /**
     * A callback function that triggers before saving. Only relevant when `isSaveEnabled = true`
     */
    onBeforeSave?: (question: MetabaseQuestion | undefined, context: {
        isNewQuestion: boolean;
    }) => Promise<void>;
    /**
     * A callback function that triggers when a user saves the question. Only relevant when `isSaveEnabled = true`
     */
    onSave?: (question: MetabaseQuestion | undefined, context: {
        isNewQuestion: boolean;
    }) => void;
    /**
     * A callback function that triggers when a question is updated, including when a user clicks the `Visualize` button in the question editor
     */
    onRun?: (question: MetabaseQuestion | undefined) => void;
    /**
     * A callback function that triggers when a user clicks the back button.
     */
    onNavigateBack?: () => void;
};

declare interface InteractiveQuestionDefaultViewProps extends FlexibleSizeProps {
    /**
     * Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.
     */
    title?: SdkQuestionTitleProps;
    /**
     * Determines whether a reset button is displayed. Only relevant when using the default layout.
     */
    withResetButton?: boolean;
    /**
     * Determines whether the chart type selector and corresponding settings button are shown. Only relevant when using the default layout.
     */
    withChartTypeSelector?: boolean;
}

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionDownloadWidgetDropdownProps = PopoverProps;

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionDownloadWidgetProps = StackProps;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionEditorButtonProps = {
    /**
     * Whether the editor is currently open
     * @defaultValue false
     */
    isOpen?: boolean;
    /**
     * Callback function to be called when the button is clicked
     */
    onClick?: MouseEventHandler<HTMLButtonElement>;
} & ActionIconProps & HTMLAttributes<HTMLButtonElement>;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionEditorProps = {
    /**
     * Callback function executed when changes are applied
     */
    onApply?: () => void;
    hasVisualizeButton?: boolean;
};

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionFilterDropdownProps = {
    /**
     * Whether to show the icon for the column item
     */
    withColumnItemIcon?: boolean;
};

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionFilterProps = {
    /**
     * Whether to show the icon for the column item
     */
    withColumnItemIcon?: boolean;
};

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionProps = BaseInteractiveQuestionProps & InteractiveQuestionDefaultViewProps;

declare type InteractiveQuestionProviderProps = PropsWithChildren<InteractiveQuestionConfig & Omit<LoadSdkQuestionParams, "questionId"> & {
    questionId: SdkQuestionId | null;
    variant?: "static" | "interactive";
}>;

declare type InteractiveQuestionQuestionIdProps = {
    /**
     * The ID of the question.
     *  <br/>
     * This is either:
     *  <br/>
     * - The numerical ID when accessing a question link, e.g., `http://localhost:3000/question/1-my-question` where the ID is `1`
     *  <br/>
     * - The `entity_id` key of the question object. You can find a question's Entity ID in the info panel when viewing a question
     *  <br/>
     * - `new` to show the notebook editor for creating new questions. `isSaveEnabled` must be `true` to allow saving the question
     */
    questionId: SdkQuestionId | null;
};

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionQuestionSettingsDropdownProps = {
    /**
     * Height for the dropdown menu
     */
    height?: CSSProperties["height"];
} & Omit<PopoverProps, "children">;

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionQuestionSettingsProps = StackProps;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionQuestionVisualizationProps = FlexibleSizeProps;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionResetButtonProps = ButtonProps;

/**
 * @category InteractiveQuestion
 * @expand
 */
export declare type InteractiveQuestionSaveButtonProps = {
    /**
     * A handler function to be called when the button is clicked
     */
    onClick?: MouseEventHandler<HTMLButtonElement>;
} & ButtonProps;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionSaveQuestionFormProps = {
    /**
     * Callback function executed when save is cancelled
     */
    onCancel?: () => void;
};

/**
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionSummarizeDropdownProps = Omit<PopoverProps, "children" | "onClose" | "opened">;

/**
 * @interface
 * @expand
 * @category InteractiveQuestion
 */
export declare type InteractiveQuestionTitleProps = CommonStylingProps;

declare type LoadSdkQuestionParams = {
    /**
     * For SQL questions only. A mapping of SQL parameter names to parameter values, such as `{ product_id: "42"}`
     */
    initialSqlParameters?: SqlParameterValues;
};

export declare type LoginStatus = LoginStatusUninitialized | LoginStatusSuccess | LoginStatusLoading | LoginStatusError;

/**
 * @inline
 */
declare type LoginStatusError = {
    status: "error";
    error: Error;
};

/**
 * @inline
 */
declare type LoginStatusLoading = {
    status: "loading";
};

/**
 * @inline
 */
declare type LoginStatusSuccess = {
    status: "success";
};

/**
 * @inline
 */
declare type LoginStatusUninitialized = {
    status: "uninitialized";
};

/**
 * @category MetabaseProvider
 */
export declare type MetabaseAuthConfig = MetabaseAuthConfigWithApiKey | MetabaseAuthConfigWithJwt | MetabaseAuthConfigWithSaml;

/**
 * @category MetabaseProvider
 */
export declare type MetabaseAuthConfigWithApiKey = BaseMetabaseAuthConfig & {
    apiKey: string;
    preferredAuthMethod?: never;
    fetchRequestToken?: never;
};

/**
 * @category MetabaseProvider
 */
export declare type MetabaseAuthConfigWithJwt = BaseMetabaseAuthConfig & {
    /**
     * Which authentication method to use.
     * If both SAML and JWT are enabled at the same time,
     * it defaults to SAML unless the preferredAuthMethod is specified.
     */
    preferredAuthMethod?: "jwt";
    /**
     * Specifies a function to fetch the refresh token.
     * The refresh token should be in the format of {@link UserBackendJwtResponse}
     */
    fetchRequestToken?: MetabaseFetchRequestTokenFn;
    apiKey?: never;
};

/**
 * @category MetabaseProvider
 */
export declare type MetabaseAuthConfigWithSaml = BaseMetabaseAuthConfig & {
    /**
     * Which authentication method to use.
     * If both SAML and JWT are enabled at the same time,
     * it defaults to SAML unless the preferredAuthMethod is specified.
     */
    preferredAuthMethod?: "saml";
    apiKey?: never;
    fetchRequestToken?: never;
};

export declare type MetabaseClickAction = {
    name: string;
} & Record<string, any>;

export declare type MetabaseClickActionPluginsConfig = (clickActions: MetabaseClickAction[], clickedDataPoint: MetabaseDataPointObject) => MetabaseClickAction[];

/**
 * The Collection entity
 */
export declare type MetabaseCollection = {
    id: SdkCollectionId;
    name: string;
    slug?: string;
    entity_id?: SdkEntityId;
    description: string | null;
};

/**
 * The CollectionItem entity
 */
export declare type MetabaseCollectionItem = {
    id: SdkCollectionId;
    entity_id?: SdkEntityId;
    model: string;
    name: string;
    description: string | null;
    type?: "instance-analytics" | "trash" | "model" | "question" | "metric" | null;
    "last-edit-info"?: {
        email: string;
        first_name: string;
        last_name: string;
        id: SdkUserId;
        timestamp: string;
    };
};

export declare interface MetabaseColors {
    /** Primary brand color used for buttons and links */
    brand?: string;
    /** Lighter variation of the brand color. Used for hover and accented elements. */
    "brand-hover"?: string;
    /** Lightest variation of the brand color. Used for hover and accented elements. */
    "brand-hover-light"?: string;
    /** Text color on dark elements. Should be a lighter color for readability. */
    "text-primary"?: string;
    /** Lighter variation of dark text on light elements. */
    "text-secondary"?: string;
    /** Text color on light elements. Should be a darker color for readability. */
    "text-tertiary"?: string;
    /** Default background color. */
    background?: string;
    /** Slightly muted background color. */
    "background-secondary"?: string;
    /** Slightly darker background color used for hover and accented elements. */
    "background-hover"?: string;
    /** Muted background color used for disabled elements, such as disabled buttons and inputs. */
    "background-disabled"?: string;
    /** Color used for borders */
    border?: string;
    /** Color used for popover shadows */
    shadow?: string;
    /** Color used for filters context */
    filter?: string;
    /** Color used for aggregations and breakouts context */
    summarize?: string;
    /** Chart colors */
    charts?: ChartColor[];
    /** Color used to indicate successful actions and positive values/trends */
    positive?: string;
    /** Color used to indicate dangerous actions and negative values/trends */
    negative?: string;
}

/**
 * Theme options for customizing specific Metabase
 * components and visualizations.
 *
 * @privateRemarks
 * Every non-optional properties here must have a default value defined
 * in DEFAULT_METABASE_COMPONENT_THEME at [default-component-theme.ts]
 */
export declare type MetabaseComponentTheme = {
    dashboard: {
        backgroundColor: string;
        /**
         * Border color of the dashboard grid, shown only when editing dashboards.
         * Defaults to `colors.border`
         **/
        gridBorderColor?: string;
        card: {
            backgroundColor: string;
            /**
             * Add custom borders to dashboard cards when set.
             * Value is the same as the border property in CSS, such as "1px solid #ff0000".
             * This will replace the card's drop shadow.
             **/
            border?: string;
        };
    };
    question: {
        /** Background color for all questions */
        backgroundColor: string;
        /** Toolbar of the default interactive question layout */
        toolbar?: {
            backgroundColor?: string;
        };
    };
    /** Data tables **/
    table: {
        /** Background color of the table header that stays fixed while scrolling. Defaults to `white` if no cell background color is set */
        stickyBackgroundColor?: string;
        cell: {
            /** Text color of cells, defaults to `text-primary`. */
            textColor: string;
            /** Default background color of cells, defaults to `background` */
            backgroundColor?: string;
            /** Font size of cell values, defaults to ~12.5px */
            fontSize: string;
        };
        idColumn?: {
            /** Text color of ID column, defaults to `brand`. */
            textColor: string;
            /** Background color of ID column, defaults to `lighten(brand)`  */
            backgroundColor?: string;
        };
    };
    /** Pivot table **/
    pivotTable: {
        cell: {
            /** Font size of cell values, defaults to ~12px */
            fontSize: string;
        };
        /** Button to toggle pivot table rows */
        rowToggle: {
            textColor: string;
            backgroundColor: string;
        };
    };
    /** Number chart */
    number?: {
        /**
         * Value displayed on number charts.
         * This also applies to the primary value in trend charts.
         **/
        value?: {
            fontSize?: CSSProperties["fontSize"];
            lineHeight?: string;
        };
    };
    /** Cartesian charts */
    cartesian: {
        /** Padding around the chart. */
        padding?: string;
        label: {
            /** Labels used in cartesian charts, such as axis ticks and series. */
            fontSize: string;
        };
        goalLine: {
            label: {
                /** Font size of goal line labels */
                fontSize: string;
            };
        };
    };
    /** Tooltip */
    tooltip?: {
        /** Tooltip text color. */
        textColor?: string;
        /** Secondary text color shown in the tooltip, e.g. for tooltip headers and percentage changes. */
        secondaryTextColor?: string;
        /** Tooltip background color. */
        backgroundColor?: string;
        /** Tooltip background color for focused rows. */
        focusedBackgroundColor?: string;
    };
    /** Popover */
    popover: {
        /** z-index of overlays. Useful for embedding components in a modal.
         * Defaults to 200. */
        zIndex?: number;
    };
    collectionBrowser: {
        breadcrumbs: {
            expandButton: {
                backgroundColor: ColorCssVariableOrString;
                hoverBackgroundColor: ColorCssVariableOrString;
                textColor: ColorCssVariableOrString;
                hoverTextColor: ColorCssVariableOrString;
            };
        };
        emptyContent: {
            icon: {
                width: CSSProperties["width"];
                height: CSSProperties["width"];
            };
            title: {
                fontSize: CSSProperties["fontSize"];
            };
            subtitle: {
                fontSize: CSSProperties["fontSize"];
            };
        };
    };
};

/**
 * The Dashboard entity
 */
export declare type MetabaseDashboard = {
    id: SdkDashboardId;
    entity_id: SdkEntityId;
    created_at: string;
    updated_at: string;
    collection?: MetabaseCollection | null;
    name: string;
    description: string | null;
    "last-edit-info": {
        id: number;
        email: string;
        first_name: string;
        last_name: string;
        timestamp: string;
    };
};

export declare type MetabaseDashboardPluginsConfig = {
    dashboardCardMenu?: DashboardCardMenuCustomElement | DashboardCardCustomMenuItem;
};

export declare type MetabaseDataPointObject = {
    value?: string | number | null | boolean;
    column?: Record<string, any>;
    event?: MouseEvent;
    data?: {
        col: Record<string, any> | null;
        value: string | number | null | boolean;
    }[];
};

export declare type MetabaseEmbeddingSessionToken = {
    id: string;
    exp: number;
};

export declare type MetabaseFetchRequestTokenFn = () => Promise<UserBackendJwtResponse>;

export declare type MetabaseFontFamily = "Roboto" | "Merriweather" | "Open Sans" | "Lato" | "Noto Sans" | "Roboto Slab" | "Source Sans Pro" | "Raleway" | "Slabo 27px" | "PT Sans" | "Poppins" | "PT Serif" | "Roboto Mono" | "Roboto Condensed" | "Playfair Display" | "Oswald" | "Ubuntu" | "Montserrat" | "Lora" | "Custom";

export declare type MetabasePluginsConfig = {
    mapQuestionClickActions?: MetabaseClickActionPluginsConfig;
    dashboard?: MetabaseDashboardPluginsConfig;
};

/**
 * A component that provides the Metabase SDK context and theme.
 *
 * @function
 * @category MetabaseProvider
 */
export declare const MetabaseProvider: NamedExoticComponent<MetabaseProviderProps>;

/**
 * @expand
 * @category MetabaseProvider
 */
export declare interface MetabaseProviderProps extends Omit<CommonStylingProps, "style"> {
    /**
     * The children of the MetabaseProvider component.
     */
    children: ReactNode;
    /**
     * Defines how to authenticate with Metabase.
     */
    authConfig: MetabaseAuthConfig;
    /**
     * See [Appearance](https://www.metabase.com/docs/latest/embedding/sdk/appearance).
     */
    theme?: MetabaseTheme;
    /**
     * See [Plugins](https://www.metabase.com/docs/latest/embedding/sdk/plugins).
     */
    pluginsConfig?: MetabasePluginsConfig;
    /**
     * See [Global event handlers](https://www.metabase.com/docs/latest/embedding/sdk/config#global-event-handlers).
     */
    eventHandlers?: SdkEventHandlersConfig;
    /**
     * Defines the display language. Accepts an ISO language code such as `en` or `de`.
     * Defaults to the instance locale.
     **/
    locale?: string;
    /**
     * A custom loader component to display while the SDK is loading.
     **/
    loaderComponent?: () => JSX_2.Element;
    /**
     * A custom error component to display when the SDK encounters an error.
     **/
    errorComponent?: SdkErrorComponent;
    /**
     * Whether to allow logging to the DevTools console. Defaults to true.
     **/
    allowConsoleLog?: boolean;
}

export declare interface MetabaseQuestion {
    id: number;
    name: string;
    description: string | null;
    entityId: string;
    isSavedQuestion: boolean;
}

/**
 * Theme configuration for embedded Metabase components.
 */
export declare interface MetabaseTheme {
    /**
     * Base font size.
     * Supported units are px, em and rem.
     * Defaults to ~14px (0.875em)
     **/
    fontSize?: string;
    /**
     * Font family that will be used for all text, it defaults to the instance's default font.
     **/
    fontFamily?: MetabaseFontFamily | (string & {});
    /** Base line height */
    lineHeight?: string | number;
    /** Color palette */
    colors?: MetabaseColors;
    /** Component theme options */
    components?: DeepPartial<MetabaseComponentTheme>;
}

/**
 * The User entity
 */
export declare type MetabaseUser = {
    id: SdkUserId;
    first_name: string | null;
    last_name: string | null;
    common_name: string;
    email: string;
    locale: string | null;
    date_joined: string;
    last_login: string;
    first_login: string;
};

export declare const MetabotQuestion: (props: object) => ReactNode;

/**
 * @deprecated Use `InteractiveQuestion` with `isSaveEnabled={true}` instead.
 *
 * @function
 * @category ModifyQuestion
 * @param props
 **/
export declare const ModifyQuestion: ({ questionId, plugins, onSave, onBeforeSave, entityTypes, isSaveEnabled, targetCollection, }: BaseInteractiveQuestionProps) => JSX_3.Element;

export declare type ParameterValues = Record<string, string | string[] | undefined | null>;

/**
 * Button to reset question modifications. Only appears when there are unsaved changes to the question.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const QuestionResetButton: ({ onClick, ...buttonProps }?: InteractiveQuestionResetButtonProps) => JSX_3.Element | null;

/**
 * Settings panel for configuring visualization options like axes, colors, and formatting.
 * Uses question context for settings.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const QuestionSettings: ({ ...stackProps }: InteractiveQuestionQuestionSettingsProps) => JSX_3.Element | null;

/**
 * Dropdown button that contains the QuestionSettings component.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const QuestionSettingsDropdown: ({ height, ...popoverProps }?: InteractiveQuestionQuestionSettingsDropdownProps) => JSX_3.Element;

/**
 * The main visualization component that renders the question results as a chart, table, or other visualization type.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const QuestionVisualization: ({ height, width, className, style, }: InteractiveQuestionQuestionVisualizationProps) => JSX_3.Element;

/**
 * Button for saving question changes. Only enabled when there are unsaved modifications to the question.
 *
 * _Note_: Currently, in custom layouts, the `SaveButton` must have an `onClick` handler or the button will not do anything when clicked.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const SaveButton: ({ ...buttonProps }?: InteractiveQuestionSaveButtonProps) => JSX_3.Element;

export declare type SdkCollectionId = number | "personal" | "root" | SdkEntityId;

declare type SdkDashboardDisplayProps = {
    /**
     * The ID of the dashboard.
     *  <br/>
     * This is either:
     *  <br/>
     *  - the numerical ID when accessing a dashboard link, i.e. `http://localhost:3000/dashboard/1-my-dashboard` where the ID is `1`
     *  <br/>
     *  - the string ID found in the `entity_id` key of the dashboard object when using the API directly or using the SDK Collection Browser to return data
     */
    dashboardId: SdkDashboardId;
    /**
     * Query parameters for the dashboard. For a single option, use a `string` value, and use a list of strings for multiple options.
     * <br/>
     * - Combining {@link SdkDashboardDisplayProps.initialParameters | initialParameters} and {@link SdkDashboardDisplayProps.hiddenParameters | hiddenParameters} to filter data on the frontend is a [security risk](https://www.metabase.com/docs/latest/embedding/sdk/authentication.html#security-warning-each-end-user-must-have-their-own-metabase-account).
     * <br/>
     * - Combining {@link SdkDashboardDisplayProps.initialParameters | initialParameters} and {@link SdkDashboardDisplayProps.hiddenParameters | hiddenParameters} to declutter the user interface is fine.
     */
    initialParameters?: ParameterValues;
    /**
     * Whether the dashboard should display a title.
     */
    withTitle?: boolean;
    /**
     * Whether the dashboard cards should display a title.
     */
    withCardTitle?: boolean;
    /**
     * Whether to hide the download button.
     */
    withDownloads?: boolean;
    /**
     * A list of [parameters to hide](https://www.metabase.com/docs/latest/embedding/public-links.html#appearance-parameters).
     * <br/>
     * - Combining {@link SdkDashboardDisplayProps.initialParameters | initialParameters} and {@link SdkDashboardDisplayProps.hiddenParameters | hiddenParameters} to filter data on the frontend is a [security risk](https://www.metabase.com/docs/latest/embedding/sdk/authentication.html#security-warning-each-end-user-must-have-their-own-metabase-account).
     * <br/>
     * - Combining {@link SdkDashboardDisplayProps.initialParameters | initialParameters} and {@link SdkDashboardDisplayProps.hiddenParameters | hiddenParameters} to declutter the user interface is fine.
     **/
    hiddenParameters?: string[];
} & CommonStylingProps;

export declare type SdkDashboardId = number | string | SdkEntityId;

export declare type SdkDashboardLoadEvent = (dashboard: MetabaseDashboard | null) => void;

export declare type SdkEntityId = string & {};

export declare type SdkErrorComponent = ({ message, }: SdkErrorComponentProps) => JSX_2.Element;

export declare type SdkErrorComponentProps = {
    message: ReactNode;
};

export declare type SdkEventHandlersConfig = {
    /**
     * Triggers when a dashboard loads with all visible cards and their content
     */
    onDashboardLoad?: SdkDashboardLoadEvent;
    /**
     * Triggers after a dashboard loads, but without its cards (at this stage only the dashboard title, tabs, and cards grid are rendered, but the contents of the cards have yet to load.
     */
    onDashboardLoadWithoutCards?: SdkDashboardLoadEvent;
};

export declare type SdkQuestionId = number | "new" | SdkEntityId;

export declare type SdkQuestionTitleProps = boolean | undefined | ReactNode | (() => ReactNode);

/**
 * Form for saving a question, including title and description. When saved:
 *
 * - For existing questions: Calls {@link InteractiveQuestionProps.onSave}
 * - Both callbacks receive the updated question object
 * - Form can be cancelled via the {@link InteractiveQuestionSaveQuestionFormProps.onCancel}
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const SdkSaveQuestionForm: ({ onCancel, }: InteractiveQuestionSaveQuestionFormProps) => JSX_3.Element | null;

export declare type SdkUserId = number;

export declare type SqlParameterValues = Record<string, string | number>;

/**
 * A lightweight dashboard component.
 *
 * @function
 * @category StaticDashboard
 */
export declare const StaticDashboard: (props: StaticDashboardProps) => ReactNode;

/**
 * @interface
 * @expand
 * @category StaticDashboard
 */
export declare type StaticDashboardProps = SdkDashboardDisplayProps & DashboardEventHandlersProps;

/**
 * A component that renders a static question.
 *
 * @function
 * @category StaticQuestion
 */
export declare const StaticQuestion: (props: StaticQuestionProps) => ReactNode;

/**
 * @interface
 * @expand
 * @category StaticQuestion
 */
export declare type StaticQuestionProps = InteractiveQuestionQuestionIdProps & {
    withChartTypeSelector?: boolean;
} & Pick<InteractiveQuestionProviderProps, "initialSqlParameters"> & FlexibleSizeProps;

/**
 * Interface for adding and managing data summaries (like counts, sums, averages). Displays as a set of badges.
 * Uses question context for summarization functionality.
 *
 * @function
 * @category InteractiveQuestion
 */
declare const Summarize: () => JSX_3.Element;

/**
 * Dropdown button for the Summarize component.
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const SummarizeDropdown: ({ ...popoverProps }: InteractiveQuestionSummarizeDropdownProps) => JSX_3.Element;

/**
 * Displays a title based on the question's state. Shows:
 *
 * - The question's display name if it's saved
 * - An auto-generated description for ad-hoc questions (non-native queries)
 * - "New question" as fallback or for new/native queries
 *
 * @function
 * @category InteractiveQuestion
 * @param props
 */
declare const Title: ({ className, style }: InteractiveQuestionTitleProps) => JSX_3.Element | undefined;

export declare const useApplicationName: () => string;

export declare const useAvailableFonts: () => {
    availableFonts: string[];
};

/**
 * Creates a dashboard
 *
 * @function
 * @category CreateDashboardModal
 */
export declare const useCreateDashboardApi: () => {
    /**
     * @param options
     */
    createDashboard: ({ collectionId, ...rest }: CreateDashboardValues) => Promise<MetabaseDashboard>;
};

export declare const useCurrentUser: () => MetabaseUser | null;

export declare const useMetabaseAuthStatus: () => LoginStatus;

export declare const useQuestionSearch: (searchQuery?: string) => {
    data?: MetabaseCollectionItem[] | undefined;
    isLoaded: boolean;
    isLoading: boolean;
    error: unknown;
};

declare const USER_FACING_ENTITY_NAMES: readonly ["collection", "dashboard", "question", "model"];

/**
 * @inline
 */
export declare type UserBackendJwtResponse = {
    jwt: string;
};

declare type UserFacingEntityName = (typeof USER_FACING_ENTITY_NAMES)[number];

declare const VisualizationButton: () => JSX_3.Element | null;

export { }
