"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemePickers = exports.themePickerStyles = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("react-native");
var button_1 = require("@fluentui-react-native/button");
var framework_1 = require("@fluentui-react-native/framework");
var themed_stylesheet_1 = require("@fluentui-react-native/themed-stylesheet");
var menu_1 = require("@react-native-menu/menu");
var applyTheme_1 = require("./applyTheme");
var CustomThemes_1 = require("./CustomThemes");
exports.themePickerStyles = (0, themed_stylesheet_1.themedStyleSheet)(function (t) {
    // picker, pickerItem, dropdown used in iOS dark mode
    return {
        pickerRoot: {
            flexDirection: 'row',
        },
        picker: {
            flexDirection: 'column',
            alignItems: 'center',
            padding: 4,
            flexShrink: 0,
        },
        pickerItem: {
            color: t.colors.bodyText,
        },
        dropdown: {
            height: 200,
            width: 90,
            fontSize: 12,
        },
    };
});
var ThemePickers = function () {
    var themedStyles = (0, exports.themePickerStyles)((0, framework_1.useTheme)());
    var onThemeSelected = React.useCallback(function (newTheme) {
        CustomThemes_1.testerTheme.themeName = newTheme;
    }, []);
    var themeMenuOptions = applyTheme_1.themeChoices.map(function (themeChoice) { return ({
        id: themeChoice.value,
        title: themeChoice.label,
        state: CustomThemes_1.testerTheme.themeName === themeChoice.value ? 'on' : 'off',
    }); });
    return (React.createElement(react_native_1.View, { style: themedStyles.pickerRoot },
        React.createElement(menu_1.MenuView, { title: "Theme", onPressAction: function (_a) {
                var nativeEvent = _a.nativeEvent;
                onThemeSelected(nativeEvent.event);
            }, actions: themeMenuOptions },
            React.createElement(button_1.ButtonV1, { appearance: "subtle" }, "Theme"))));
};
exports.ThemePickers = ThemePickers;
//# sourceMappingURL=ThemePickers.ios.js.map