"use strict";

var __importDefault = this && this.__importDefault || function(mod) {
    return mod && mod.__esModule ? mod : {
        default: mod
    };
};

Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.TableTheme = exports.tableThemeIsChanged = exports.get = exports.of = exports.theme = exports.SIMPLIFY = exports.DEFAULT = exports.ARCO = exports.BRIGHT = exports.DARK = void 0;

const helper_1 = require("./tools/helper"), DARK_1 = __importDefault(require("./themes/DARK")), BRIGHT_1 = __importDefault(require("./themes/BRIGHT")), ARCO_1 = __importDefault(require("./themes/ARCO")), DEFAULT_1 = __importDefault(require("./themes/DEFAULT")), SIMPLIFY_1 = __importDefault(require("./themes/SIMPLIFY")), themes_1 = require("./themes/themes");

Object.defineProperty(exports, "tableThemeIsChanged", {
    enumerable: !0,
    get: function() {
        return themes_1.tableThemeIsChanged;
    }
});

const theme_define_1 = require("./themes/theme-define");

Object.defineProperty(exports, "TableTheme", {
    enumerable: !0,
    get: function() {
        return theme_define_1.TableTheme;
    }
}), exports.DARK = new theme_define_1.TableTheme(DARK_1.default, DARK_1.default), 
exports.BRIGHT = new theme_define_1.TableTheme(BRIGHT_1.default, BRIGHT_1.default), 
exports.ARCO = new theme_define_1.TableTheme(ARCO_1.default, ARCO_1.default), exports.DEFAULT = new theme_define_1.TableTheme(DEFAULT_1.default, DEFAULT_1.default), 
exports.SIMPLIFY = new theme_define_1.TableTheme(SIMPLIFY_1.default, SIMPLIFY_1.default);

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

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

function get() {
    return (0, helper_1.extend)(builtin, themes_1.themes);
}

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