import { Overrides } from '@material-ui/core/styles/overrides';
import { ComponentsProps } from '@material-ui/core/styles/props';
import { Theme, ThemeOptions, PaletteOptions as PaletteOptions$1 } from '@mui/material/styles';
import { Theme as Theme$1, ThemeOptions as ThemeOptions$1 } from '@material-ui/core/styles';
import { PaletteOptions, Palette } from '@material-ui/core/styles/createPalette';
import * as _backstage_theme from '@backstage/theme';
import { ReactNode } from 'react';
import * as _material_ui_core from '@material-ui/core';
import { ThemeOptions as ThemeOptions$2, Theme as Theme$2 } from '@material-ui/core/styles/createTheme';
import { OverridesStyleRules } from '@mui/material/styles/overrides';

/**
 * Transform Material UI v5 component themes into a v4 theme props and overrides.
 *
 * @public
 */
declare function transformV5ComponentThemesToV4(theme: Theme, components?: ThemeOptions['components']): {
    overrides: Overrides;
    props: ComponentsProps;
};

/**
 * Backstage specific additions to the material-ui palette.
 *
 * @public
 */
type BackstagePaletteAdditions = {
    status: {
        ok: string;
        warning: string;
        error: string;
        pending: string;
        running: string;
        aborted: string;
    };
    border: string;
    textContrast: string;
    textVerySubtle: string;
    textSubtle: string;
    highlight: string;
    errorBackground: string;
    warningBackground: string;
    infoBackground: string;
    errorText: string;
    infoText: string;
    warningText: string;
    linkHover: string;
    link: string;
    gold: string;
    navigation: {
        background: string;
        indicator: string;
        color: string;
        selectedColor: string;
        navItem?: {
            hoverBackground: string;
        };
        submenu?: {
            background: string;
        };
    };
    tabbar: {
        indicator: string;
    };
    /**
     * @deprecated The entire `bursts` section will be removed in a future release
     */
    bursts: {
        fontColor: string;
        slackChannelText: string;
        backgroundColor: {
            default: string;
        };
        gradient: {
            linear: string;
        };
    };
    pinSidebarButton: {
        icon: string;
        background: string;
    };
    banner: {
        info: string;
        error: string;
        text: string;
        link: string;
        closeButtonColor?: string;
        warning?: string;
    };
    code?: {
        background?: string;
    };
};
/**
 * Selector for what page theme to use.
 *
 * @public
 */
type PageThemeSelector = {
    themeId: string;
};
/**
 * The theme definitions for a given layout page.
 *
 * @public
 */
type PageTheme = {
    colors: string[];
    shape: string;
    backgroundImage: string;
    fontColor: string;
};
/**
 * Backstage specific additions to the material-ui theme.
 *
 * @public
 */
type BackstageThemeAdditions = {
    page: PageTheme;
    getPageTheme: (selector: PageThemeSelector) => PageTheme;
};
/**
 * Custom Typography
 *
 * @public
 */
type BackstageTypography = {
    htmlFontSize: number;
    fontFamily: string;
    h1: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
    h2: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
    h3: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
    h4: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
    h5: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
    h6: {
        fontFamily?: string;
        fontSize: number | string;
        fontWeight: number;
        marginBottom: number;
    };
};

/**
 * Supported Material UI Versions
 *
 * Currently: 'v4' and 'v5'.
 *
 * @public
 */
type SupportedVersions = 'v4' | 'v5';
/**
 * Supported Material UI Theme Types for `SupportedVersions`
 *
 * @public
 */
type SupportedThemes = Theme$1 | Theme;
/**
 * A container of one theme for multiple different Material UI versions.
 *
 * Currently known keys are 'v4' and 'v5'.
 *
 * @public
 */
interface UnifiedTheme {
    getTheme(version: SupportedVersions): SupportedThemes | undefined;
}

/**
 * Options for creating a new {@link UnifiedTheme}.
 *
 * @public
 */
interface UnifiedThemeOptions {
    palette: PaletteOptions & PaletteOptions$1;
    defaultPageTheme?: string;
    pageTheme?: Record<string, PageTheme>;
    fontFamily?: string;
    htmlFontSize?: number;
    components?: ThemeOptions['components'];
    typography?: BackstageTypography;
}
/**
 * Creates a new {@link UnifiedTheme} using the provided options.
 *
 * @public
 */
declare function createUnifiedTheme(options: UnifiedThemeOptions): UnifiedTheme;
/**
 * Creates a new {@link UnifiedTheme} using Material UI v4 theme options.
 * Note that this uses `adaptV4Theme` from Material UI v5, which is deprecated.
 *
 * @public
 */
declare function createUnifiedThemeFromV4(options: ThemeOptions$1): UnifiedTheme;

/**
 * Built-in Backstage Material UI themes.
 *
 * @public
 */
declare const themes: {
    light: _backstage_theme.UnifiedTheme;
    dark: _backstage_theme.UnifiedTheme;
};

/**
 * Props for {@link UnifiedThemeProvider}.
 *
 * @public
 */
interface UnifiedThemeProviderProps {
    children: ReactNode;
    theme: UnifiedTheme;
    noCssBaseline?: boolean;
}
/**
 * Provides themes for all Material UI versions supported by the provided unified theme.
 *
 * @public
 */
declare function UnifiedThemeProvider(props: UnifiedThemeProviderProps): JSX.Element;

/**
 * Default Typography settings.
 *
 * @public
 */
declare const defaultTypography: BackstageTypography;
/**
 * Options for {@link createBaseThemeOptions}.
 *
 * @public
 */
interface BaseThemeOptionsInput<PaletteOptions> {
    palette: PaletteOptions;
    defaultPageTheme?: string;
    pageTheme?: Record<string, PageTheme>;
    fontFamily?: string;
    htmlFontSize?: number;
    typography?: BackstageTypography;
}
/**
 * A helper for creating theme options.
 *
 * @public
 */
declare function createBaseThemeOptions<PaletteOptions>(options: BaseThemeOptionsInput<PaletteOptions>): {
    palette: PaletteOptions;
    typography: BackstageTypography;
    page: PageTheme;
    getPageTheme: ({ themeId }: PageThemeSelector) => PageTheme;
};

/**
 * The default predefined burst shapes.
 *
 * @public
 * @remarks
 *
 * How to add a shape:
 *
 * 1. Get the SVG shape from figma, should be ~1400 wide, ~400 high
 *    and only the white-to-transparent mask, no colors.
 * 2. Run it through https://jakearchibald.github.io/svgomg/
 * 3. Run that through https://github.com/tigt/mini-svg-data-uri
 *    with something like https://npm.runkit.com/mini-svg-data-uri
 * 4. Wrap the output in `url("")`
 * 5. Give it a name and paste it into the `shapes` object below.
 */
declare const shapes: Record<string, string>;
/**
 * The color range variants that are used in e.g. colorful bursts.
 *
 * @public
 */
declare const colorVariants: Record<string, string[]>;
/**
 * Utility to not have to write colors and shapes twice.
 *
 * @public
 * @remarks
 *
 * As the background shapes and colors are decorative, we place them onto the
 * page as a CSS `background-image` instead of an HTML element of its own.
 */
declare function genPageTheme(props: {
    colors: string[];
    shape: string;
    options?: {
        fontColor?: string;
    };
}): PageTheme;
/**
 * All of the builtin page themes.
 *
 * @public
 */
declare const pageTheme: Record<string, PageTheme>;

/**
 * Built-in Backstage color palettes.
 *
 * @public
 */
declare const palettes: {
    light: {
        type: "light";
        mode: "light";
        background: {
            default: string;
            paper: string;
        };
        status: {
            ok: string;
            warning: string;
            error: string;
            running: string;
            pending: string;
            aborted: string;
        };
        bursts: {
            fontColor: string;
            slackChannelText: string;
            backgroundColor: {
                default: string;
            };
            gradient: {
                linear: string;
            };
        };
        primary: {
            main: string;
        };
        banner: {
            info: string;
            error: string;
            text: string;
            link: string;
            closeButtonColor: string;
            warning: string;
        };
        border: string;
        textContrast: string;
        textVerySubtle: string;
        textSubtle: string;
        highlight: string;
        errorBackground: string;
        warningBackground: string;
        infoBackground: string;
        errorText: string;
        infoText: string;
        warningText: string;
        linkHover: string;
        link: string;
        gold: string;
        navigation: {
            background: string;
            indicator: string;
            color: string;
            selectedColor: string;
            navItem: {
                hoverBackground: string;
            };
            submenu: {
                background: string;
            };
        };
        pinSidebarButton: {
            icon: string;
            background: string;
        };
        tabbar: {
            indicator: string;
        };
    };
    dark: {
        type: "dark";
        mode: "dark";
        background: {
            default: string;
            paper: string;
        };
        status: {
            ok: string;
            warning: string;
            error: string;
            running: string;
            pending: string;
            aborted: string;
        };
        bursts: {
            fontColor: string;
            slackChannelText: string;
            backgroundColor: {
                default: string;
            };
            gradient: {
                linear: string;
            };
        };
        primary: {
            main: string;
            dark: string;
        };
        secondary: {
            main: string;
        };
        banner: {
            info: string;
            error: string;
            text: string;
            link: string;
            closeButtonColor: string;
            warning: string;
        };
        border: string;
        textContrast: string;
        textVerySubtle: string;
        textSubtle: string;
        highlight: string;
        errorBackground: string;
        warningBackground: string;
        infoBackground: string;
        errorText: string;
        infoText: string;
        warningText: string;
        linkHover: string;
        link: string;
        gold: string;
        navigation: {
            background: string;
            indicator: string;
            color: string;
            selectedColor: string;
            navItem: {
                hoverBackground: string;
            };
            submenu: {
                background: string;
            };
        };
        pinSidebarButton: {
            icon: string;
            background: string;
        };
        tabbar: {
            indicator: string;
        };
    };
};

/**
 * The old Material UI v4 Backstage light theme.
 *
 * @public
 * @deprecated Use {@link themes.light} instead.
 */
declare const lightTheme: _material_ui_core.Theme;
/**
 * The old Material UI v4 Backstage dark theme.
 *
 * @public
 * @deprecated Use {@link themes.dark} instead.
 */
declare const darkTheme: _material_ui_core.Theme;

/**
 * The full Backstage palette.
 *
 * @public
 * @deprecated This type is deprecated, the Material UI Palette type is now always extended instead.
 */
type BackstagePalette = Palette & BackstagePaletteAdditions;
/**
 * The full Backstage palette options.
 *
 * @public
 * @deprecated This type is deprecated, the Material UI PaletteOptions type is now always extended instead.
 */
type BackstagePaletteOptions = PaletteOptions & BackstagePaletteAdditions;
/**
 * Backstage theme options.
 *
 * @public
 * @deprecated This type is deprecated, the Material UI ThemeOptions type is now always extended instead.
 * @remarks
 *
 * This is essentially a partial theme definition made by the user, that then
 * gets merged together with defaults and other values to form the final
 * {@link BackstageTheme}.
 *
 */
interface BackstageThemeOptions extends ThemeOptions$2 {
    palette: BackstagePaletteOptions;
    page: PageTheme;
    getPageTheme: (selector: PageThemeSelector) => PageTheme;
}
/**
 * A Backstage theme.
 *
 * @public
 * @deprecated This type is deprecated, the Material UI Theme type is now always extended instead.
 */
interface BackstageTheme extends Theme$2 {
    palette: BackstagePalette;
    page: PageTheme;
    getPageTheme: (selector: PageThemeSelector) => PageTheme;
}
/**
 * A simpler configuration for creating a new theme that just tweaks some parts
 * of the backstage one.
 *
 * @public
 * @deprecated Use {@link BaseThemeOptionsInput} instead.
 */
type SimpleThemeOptions = {
    palette: PaletteOptions;
    defaultPageTheme?: string;
    pageTheme?: Record<string, PageTheme>;
    fontFamily?: string;
    htmlFontSize?: number;
    typography?: BackstageTypography;
};
declare module '@material-ui/core/styles/createPalette' {
    interface Palette extends BackstagePaletteAdditions {
    }
    interface PaletteOptions extends Partial<BackstagePaletteAdditions> {
    }
}
declare module '@material-ui/core/styles/createTheme' {
    interface Theme extends BackstageThemeAdditions {
    }
    interface ThemeOptions extends Partial<BackstageThemeAdditions> {
    }
}

/**
 * An old helper for creating Material UI v4 theme options.
 *
 * @public
 * @deprecated Use {@link createBaseThemeOptions} instead.
 */
declare function createThemeOptions(options: SimpleThemeOptions): ThemeOptions$2;
/**
 * * An old helper for creating Material UI v4 theme overrides.
 *
 * @public
 * @deprecated Use {@link defaultComponentThemes} with {@link transformV5ComponentThemesToV4} instead.
 */
declare function createThemeOverrides(theme: Theme$2): Overrides;
/**
 * The old method to create a Backstage Material UI v4 theme using a palette.
 * The theme is created with the common Backstage options and component styles.
 *
 * @public
 * @deprecated Use {@link createUnifiedTheme} instead.
 */
declare function createTheme(options: SimpleThemeOptions): Theme$2;

declare module '@mui/private-theming/defaultTheme' {
    interface DefaultTheme extends Theme {
    }
}
/**
 * Merge interface declarations into this type to register overrides for your components.
 *
 * @public
 * @example
 * ```ts
 * declare module '@backstage/theme' {
 *   interface OverrideComponentNameToClassKeys {
 *     MyComponent: 'root' | 'header';
 *   }
 * }
 * ```
 */
interface OverrideComponentNameToClassKeys {
}
type BackstageComponentOverrides = {
    [TName in keyof OverrideComponentNameToClassKeys]?: {
        styleOverrides?: Partial<OverridesStyleRules<OverrideComponentNameToClassKeys[TName], TName, Theme>>;
    };
};
declare module '@mui/material/styles' {
    interface Palette extends BackstagePaletteAdditions {
    }
    interface PaletteOptions extends Partial<BackstagePaletteAdditions> {
    }
}
declare module '@mui/material/styles' {
    interface Theme extends BackstageThemeAdditions {
    }
    interface ThemeOptions extends Partial<BackstageThemeAdditions> {
    }
}
declare module '@mui/material/styles' {
    interface Components extends BackstageComponentOverrides {
    }
}

/**
 * A helper for creating theme overrides.
 *
 * @public
 */
declare const defaultComponentThemes: ThemeOptions['components'];

export { type BackstagePalette, type BackstagePaletteAdditions, type BackstagePaletteOptions, type BackstageTheme, type BackstageThemeAdditions, type BackstageThemeOptions, type BackstageTypography, type BaseThemeOptionsInput, type OverrideComponentNameToClassKeys, type PageTheme, type PageThemeSelector, type SimpleThemeOptions, type SupportedThemes, type SupportedVersions, type UnifiedTheme, type UnifiedThemeOptions, UnifiedThemeProvider, type UnifiedThemeProviderProps, colorVariants, createBaseThemeOptions, createTheme, createThemeOptions, createThemeOverrides, createUnifiedTheme, createUnifiedThemeFromV4, darkTheme, defaultComponentThemes, defaultTypography, genPageTheme, lightTheme, pageTheme, palettes, shapes, themes, transformV5ComponentThemesToV4 };
