"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core_1 = require("@bluebase/core");
const components_1 = require("@bluebase/components");
const react_1 = tslib_1.__importDefault(require("react"));
class ThemePicker extends react_1.default.PureComponent {
    render() {
        const BB = this.context;
        const themes = [...BB.Themes.entries()];
        return (react_1.default.createElement(core_1.ThemeContext.Consumer, null, ({ changeTheme }) => (react_1.default.createElement(components_1.Picker, { selectedValue: BB.Configs.getValue('theme.name'), style: { width: 150 }, onValueChange: changeTheme }, themes.map(entry => (react_1.default.createElement(components_1.Picker.Item, { label: entry[1].name, value: entry[0], key: entry[0] })))))));
    }
}
ThemePicker.contextType = core_1.BlueBaseContext;
exports.ThemePicker = ThemePicker;
