"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemeInternalApi = void 0;
const windowFactory_1 = require("../../View/Components/Popups/WindowPopups/windowFactory");
const ApiBase_1 = require("../Implementation/ApiBase");
class ThemeInternalApi extends ApiBase_1.ApiBase {
    isSystemTheme(themeName) {
        return this.getThemeApi()
            .getSystemThemes()
            .some((theme) => theme.Name === themeName);
    }
    getThemeClassName(theme) {
        return `ab--theme-${theme}`;
    }
    getDOMPreferredColorScheme() {
        return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
    }
    openInWindow() {
        this.getAdaptableInternalApi().showPopupWindow({
            id: windowFactory_1.SHOW_THEME_EDITOR,
            title: 'Theme',
            icon: 'theme',
            factoryId: windowFactory_1.SHOW_THEME_EDITOR,
            popupProps: {},
        });
    }
}
exports.ThemeInternalApi = ThemeInternalApi;
