import { extend, getIgnoreCase } from "./tools/helper";

import darkTheme from "./themes/DARK";

import brightTheme from "./themes/BRIGHT";

import arcoTheme from "./themes/ARCO";

import defaultTheme from "./themes/DEFAULT";

import materialDesignTheme from "./themes/SIMPLIFY";

import { themes as plugins, tableThemeIsChanged } from "./themes/themes";

import { TableTheme } from "./themes/theme-define";

export const DARK = new TableTheme(darkTheme, darkTheme);

export const BRIGHT = new TableTheme(brightTheme, brightTheme);

export const ARCO = new TableTheme(arcoTheme, arcoTheme);

export const DEFAULT = new TableTheme(defaultTheme, defaultTheme);

export const SIMPLIFY = new TableTheme(materialDesignTheme, materialDesignTheme);

const builtin = {
    DEFAULT: DEFAULT,
    SIMPLIFY: SIMPLIFY,
    ARCO: ARCO,
    DARK: DARK,
    BRIGHT: BRIGHT
};

export const theme = {
    TableTheme: TableTheme
};

export function of(value) {
    if (!value) return null;
    if ("string" == typeof value) {
        const t = getIgnoreCase(get(), value);
        return t ? t instanceof TableTheme ? t : new TableTheme(t, t) : null;
    }
    return value instanceof TableTheme ? value : new TableTheme(value, value);
}

export function get() {
    return extend(builtin, plugins);
}

export { tableThemeIsChanged };

export { TableTheme };

export default {
    DARK: DARK,
    BRIGHT: BRIGHT,
    ARCO: ARCO,
    DEFAULT: DEFAULT,
    SIMPLIFY: SIMPLIFY,
    theme: theme,
    of: of,
    get: get
};
//# sourceMappingURL=themes.js.map