"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThemePickers = exports.PartPicker = exports.themePickerStyles = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("react-native");
var text_1 = require("@fluentui-react-native/text");
var applyBrand_1 = require("./applyBrand");
var applyTheme_1 = require("./applyTheme");
var CustomThemes_1 = require("./CustomThemes");
var 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,
    },
});
var PartPicker = function (props) {
    var initial = props.initial, contents = props.contents, onChange = props.onChange;
    var _a = React.useState(initial), selected = _a[0], setSelected = _a[1];
    var onValueChange = React.useCallback(function (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;
var PickerLabel = text_1.TextV1.customize({ variant: 'bodySemibold' });
var ThemePickers = function () {
    var onBrandChange = React.useCallback(function (newBrand) {
        CustomThemes_1.testerTheme.brand = newBrand;
    }, []);
    var onThemeSelected = React.useCallback(function (newTheme) {
        CustomThemes_1.testerTheme.themeName = newTheme;
    }, []);
    var onAppearanceChange = React.useCallback(function (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 })),
        React.createElement(react_native_1.View, { style: exports.themePickerStyles.picker },
            React.createElement(PickerLabel, null, "Brand: "),
            React.createElement(exports.PartPicker, { initial: CustomThemes_1.testerTheme.brand, onChange: onBrandChange, contents: applyBrand_1.brandOptions }))));
};
exports.ThemePickers = ThemePickers;
//# sourceMappingURL=ThemePickers.win32.js.map