"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.PartPicker = exports.themePickerStyles = void 0;
const React = __importStar(require("react"));
const react_native_1 = require("react-native");
const text_1 = require("@fluentui-react-native/text");
const applyTheme_1 = require("./applyTheme");
const CustomThemes_1 = require("./CustomThemes");
const MenuPicker_1 = require("../TestComponents/Common/MenuPicker");
exports.themePickerStyles = react_native_1.StyleSheet.create({
    pickerRoot: {
        flexDirection: 'row',
    },
    picker: {
        flexDirection: 'row',
        alignItems: 'center',
        padding: 4,
    },
    dropdown: {
        height: 30,
        width: 120,
        fontSize: 12,
    },
});
const PartPicker = (props) => {
    const { initial, contents, onChange } = props;
    const [selected, setSelected] = React.useState(initial);
    const onValueChange = React.useCallback((value) => {
        setSelected(value);
        onChange(value);
    }, [setSelected, onChange]);
    return React.createElement(MenuPicker_1.MenuPicker, { selected: selected, style: exports.themePickerStyles.dropdown, onChange: onValueChange, collection: contents });
};
exports.PartPicker = PartPicker;
const PickerLabel = text_1.TextV1.customize({ variant: 'bodySemibold' });
const ThemePickers = () => {
    const onThemeSelected = React.useCallback((newTheme) => {
        CustomThemes_1.testerTheme.themeName = newTheme;
    }, []);
    const onAppearanceChange = React.useCallback((newAppearance) => {
        CustomThemes_1.testerTheme.appearance = newAppearance;
    }, []);
    return (React.createElement(react_native_1.View, { style: exports.themePickerStyles.pickerRoot },
        React.createElement(react_native_1.View, { style: exports.themePickerStyles.picker },
            React.createElement(PickerLabel, null, "Theme: "),
            React.createElement(exports.PartPicker, { initial: CustomThemes_1.testerTheme.themeName, onChange: onThemeSelected, contents: applyTheme_1.themeChoices })),
        React.createElement(react_native_1.View, { style: exports.themePickerStyles.picker },
            React.createElement(PickerLabel, null, "Light/Dark: "),
            React.createElement(exports.PartPicker, { initial: CustomThemes_1.testerTheme.appearance, onChange: onAppearanceChange, contents: CustomThemes_1.lightnessOptions }))));
};
exports.ThemePickers = ThemePickers;
//# sourceMappingURL=ThemePickers.js.map