import { FC } from 'react';
import { FilterOperator } from '@lightdash/common';
import { LanguageMap } from '@lightdash/common';
import { SavedChart } from '@lightdash/common';

export declare const Chart: FC<Omit<Props, 'filters' | 'onExplore'> & {
    id: string;
}>;

export declare const Dashboard: FC<Props>;

export declare const Explore: FC<Props & {
    exploreId: string;
    savedChart: SavedChart;
}>;

export { FilterOperator }

declare const Lightdash: {
    Dashboard: FC<Props>;
    Explore: FC<Props & {
        exploreId: string;
        savedChart: SavedChart;
    }>;
    Chart: FC<Omit<Props, "filters" | "onExplore"> & {
        id: string;
    }>;
    FilterOperator: typeof FilterOperator;
};
export default Lightdash;

declare type Props = {
    instanceUrl: string;
    token: Promise<string> | string;
    styles?: {
        backgroundColor?: string;
        fontFamily?: string;
    };
    filters?: SdkFilter[];
    contentOverrides?: LanguageMap;
    onExplore?: (options: {
        chart: SavedChart;
    }) => void;
};

declare type SdkFilter = {
    model: string;
    field: string;
    operator: `${FilterOperator}`;
    value: unknown | unknown[];
};

export { }


declare module '@mantine-8/core' {
    interface ButtonProps {
        variant?: ButtonVariant | 'compact-outline' | 'dark';
    }
    interface PaperProps {
        variant?: 'dotted';
    }
    interface LoaderProps {
        /**
         * Displays a message after 8s. Only available when type='dots'
         */
        delayedMessage?: string;
    }
    interface MantineThemeColorsOverride {
        colors: Record<ExtendedCustomColors, MantineColorsTuple>;
    }
}
