"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StandardUsage = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var react_native_1 = require("react-native");
var react_native_2 = require("@fluentui/react-native");
var styles_1 = require("./styles");
var MenuPicker_1 = require("../Common/MenuPicker");
var styles_2 = require("../Common/styles");
var styles_3 = require("../PersonaCoin/styles");
var allSizes = [
    styles_3.undefinedText,
    'size8',
    'size24',
    'size32',
    'size40',
    'size48',
    'size56',
    'size72',
    'size100',
    'size120',
];
var allSizesCollection = allSizes.map(function (size) {
    return {
        label: size,
        value: size,
    };
});
function SwitchWithLabel(props) {
    var label = props.label, value = props.value, onValueChange = props.onValueChange;
    return (React.createElement(react_native_1.View, { style: styles_2.commonTestStyles.switch },
        React.createElement(react_native_1.Text, null, label),
        React.createElement(react_native_1.Switch, { value: value, onValueChange: onValueChange })));
}
var StandardUsage = function () {
    var _a = React.useState(true), showImage = _a[0], setShowImage = _a[1];
    var _b = React.useState(true), showPrimary = _b[0], setShowPrimary = _b[1];
    var _c = React.useState(true), showSecondary = _c[0], setShowSecondary = _c[1];
    var _d = React.useState(true), showTertiary = _d[0], setShowTertiary = _d[1];
    var _e = React.useState(true), showOptional = _e[0], setShowOptional = _e[1];
    var _f = React.useState('size72'), imageSize = _f[0], setImageSize = _f[1];
    return (React.createElement(react_native_1.View, { style: styles_2.commonTestStyles.root },
        React.createElement(react_native_1.View, { style: styles_2.commonTestStyles.settings },
            React.createElement(SwitchWithLabel, { label: "Show image", value: showImage, onValueChange: setShowImage }),
            React.createElement(SwitchWithLabel, { label: "Show primary text", value: showPrimary, onValueChange: setShowPrimary }),
            React.createElement(SwitchWithLabel, { label: "Show secondary text", value: showSecondary, onValueChange: setShowSecondary }),
            React.createElement(SwitchWithLabel, { label: "Show tertiary text", value: showTertiary, onValueChange: setShowTertiary }),
            React.createElement(SwitchWithLabel, { label: "Show optional text", value: showOptional, onValueChange: setShowOptional }),
            React.createElement(MenuPicker_1.MenuPicker, { prompt: "Size", style: styles_2.commonTestStyles.header, selected: imageSize || styles_3.undefinedText, onChange: function (size) { return setImageSize(size === styles_3.undefinedText ? undefined : size); }, collection: allSizesCollection })),
        React.createElement(react_native_2.Persona, { text: showPrimary ? 'Satya Nadella' : undefined, secondaryText: showSecondary ? 'CEO' : undefined, tertiaryText: showTertiary ? 'Microsoft' : undefined, optionalText: showOptional ? 'Office of the CEO' : undefined, size: imageSize, initials: "SN", imageUrl: showImage ? styles_1.satyaImageUrl : undefined, imageDescription: "Profile photo of Satya Nadella", presence: 'away' })));
};
exports.StandardUsage = StandardUsage;
//# sourceMappingURL=StandardUsage.js.map