"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemePickers = exports.themePickerStyles = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const button_1 = require("@fluentui-react-native/button");
const framework_1 = require("@fluentui-react-native/framework");
const themed_stylesheet_1 = require("@fluentui-react-native/themed-stylesheet");
const menu_1 = require("@react-native-menu/menu");
const applyTheme_1 = require("./applyTheme");
const CustomThemes_1 = require("./CustomThemes");
exports.themePickerStyles = (0, themed_stylesheet_1.themedStyleSheet)((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,
        },
    };
});
const ThemePickers = () => {
    const themedStyles = (0, exports.themePickerStyles)((0, framework_1.useTheme)());
    const onThemeSelected = React.useCallback((newTheme) => {
        CustomThemes_1.testerTheme.themeName = newTheme;
    }, []);
    const themeMenuOptions = applyTheme_1.themeChoices.map((themeChoice) => ({
        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: ({ nativeEvent }) => {
                onThemeSelected(nativeEvent.event);
            }, actions: themeMenuOptions },
            React.createElement(button_1.ButtonV1, { appearance: "subtle" }, "Theme"))));
};
exports.ThemePickers = ThemePickers;
//# sourceMappingURL=ThemePickers.ios.js.map