"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlignmentPicker = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var MenuPicker_1 = require("./MenuPicker");
var styles_1 = require("../PersonaCoin/styles");
var alignmentValues = [styles_1.undefinedText, 'start', 'center', 'end'];
var AlignmentPicker = function (props) {
    var label = props.label, onSelectionChange = props.onSelectionChange, style = props.style;
    var _a = React.useState(), selectedValue = _a[0], setSelectedValue = _a[1];
    var alignmentCollection = alignmentValues.map(function (value) {
        return {
            label: value,
            value: value,
        };
    });
    return (React.createElement(MenuPicker_1.MenuPicker, { style: style, prompt: label, selected: selectedValue || styles_1.undefinedText, onChange: function (value, index) {
            var alignmentValue = index == 0 ? undefined : value;
            onSelectionChange(alignmentValue);
            setSelectedValue(alignmentValue);
        }, collection: alignmentCollection }));
};
exports.AlignmentPicker = AlignmentPicker;
//# sourceMappingURL=AlignmentPicker.js.map