/**
 * Shared options for embedding
 */
export interface SharedEmbedOptions {
    /**
     * The background color to use for the embedded object.
     *
     * If no background is provided, it will set a default background color based on the theme.
     *
     * To control the background color using CSS and classes, set to `transparent`.
     **/
    background?: string;
    /**
     * The base url for your MongoDB {@link EmbedSDK} instance.
     *
     * This should look something like: `https://charts.mongodb.com/charts-example-url-zdvkh`
     */
    baseUrl: string;
    /**
     * The height of the embedded object.
     *
     * If no height is provided, it will default to stretching to the height of it's container. If a value is provided without units, it will be assumed to be pixels (px).
     */
    height?: string | number;
    /**
     * The width of the embedded object.
     *
     * If no width is provided, it will default to stretching to the width of it's container. If a value is provided without units, it will be assumed to be pixels (px).
     */
    width?: string | number;
    /**
     * Whether the embedded object should be automatically refreshed.
     */
    autoRefresh?: boolean;
    /**
     * How long in seconds data is considered fresh.
     *
     * By default, staleness tolerance is 1 hour.
     */
    maxDataAge?: number;
    /**
     * Whether to show the MongoDB attribution logo.
     *
     * By default, this is set to `true`
     */
    showAttribution?: boolean;
    /**
     * The color scheme to apply.
     *
     * If the theme is set to 'dark' and you have specified a custom background color, you should ensure that your background color has appropriate contrast.
     */
    theme?: Theme;
    /**
     * A function that returns a valid JWT that will be used to authenticate the user.
     *
     * This function will be called when the embedded object is first rendered, and then successively when the SDK needs to refresh an invalid token.
     *
     * See also {@link getRealmUserToken}
     */
    getUserToken?: () => string | Promise<string>;
}
/**
 * The set of options that you can use when both creating an {@link EmbedSDK} object or using {@link EmbedSDK.createChart}.
 */
export interface EmbedChartOptions extends SharedEmbedOptions {
    /**
     * The id for the chart you want to embed.
     *
     * This can be found in the "Embed Chart" dialog when viewing a chart on a dashboard.
     */
    chartId: string;
    /**
     * The filter to apply to the embedded chart.
     *
     * This expects an object that contains a valid [query operators](https://docs.mongodb.com/manual/reference/operator/query/#query-selectors).
     * Any fields referenced in this filter are expected to be whitelisted in the "Embed Chart" dialog for each Chart you wish to filter on.
     */
    filter?: object;
    /**
     * How frequently a chart should refresh once it has been embedded.
     *
     * The minimum refreshInterval is 10 seconds. By default, a chart will never refresh once rendered.
     *
     * @deprecated This option is deprecated. Please use the autoRefresh option with the maxDataAge option to configure how often the chart refreshes.
     */
    refreshInterval?: number;
}
/**
 * The set of options that you can use when both creating an {@link EmbedSDK} object or using {@link EmbedSDK.createDashboard}.
 */
export interface EmbedDashboardOptions extends SharedEmbedOptions {
    /**
     * The id for the dashboard you want to embed.
     *
     * This can be found in the "Embed Dashboard" dialog.
     */
    dashboardId: string;
    /**
     * Assign background colour for all charts in an embedded dashboard.
     */
    chartsBackground?: string;
    /**
     * Width behaviour of charts in an embedded dashboard.
     *
     * - `'fixed'` Width of charts will remain the same as the dashboard.
     *
     * - `'scale'` Width of charts will scale according to the container.
     */
    widthMode?: Scaling;
    /**
     * Height behaviour of charts in an embedded dashboard.
     *
     * - `'fixed'` Height of charts will remain the same as the dashboard.
     * - `'scale'` Height of charts will scale according to the container.
     */
    heightMode?: Scaling;
    /**
     * Display the dashboard title and description.
     */
    showTitleAndDesc?: boolean;
}
export declare type EmbedOptions = EmbedChartOptions | EmbedDashboardOptions;
export declare type EventHandlerPayload = Record<string, unknown>;
export declare type EventHandlerOptions = {
    includes?: object[];
};
export declare type EmbedChartEvent = 'click' | 'refresh';
export declare type EventHandler = (payload: EventHandlerPayload) => void;
export declare enum ThemeEnum {
    DARK = "dark",
    LIGHT = "light"
}
export declare type Theme = `${ThemeEnum}`;
export declare enum ScalingEnum {
    FIXED = "fixed",
    SCALE = "scale"
}
export declare type Scaling = `${ScalingEnum}`;
export declare type EventSender = new (...args: any[]) => {
    /**
     * Send message to embedded app.
     */
    _send(msgName: string, ...payload: unknown[]): Promise<[unknown]>;
};
