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