define(["require", "exports", "tslib", "react", "../../../Utilities", "../BasePicker", "../BasePicker.Props", "./PeoplePickerItems/SelectedItemDefault", "./PeoplePickerItems/SuggestionItemDefault", "./PeoplePicker.scss"], function (require, exports, tslib_1, React, Utilities_1, BasePicker_1, BasePicker_Props_1, SelectedItemDefault_1, SuggestionItemDefault_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var BasePeoplePicker = (function (_super) {
        tslib_1.__extends(BasePeoplePicker, _super);
        function BasePeoplePicker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return BasePeoplePicker;
    }(BasePicker_1.BasePicker));
    exports.BasePeoplePicker = BasePeoplePicker;
    var MemberListPeoplePicker = (function (_super) {
        tslib_1.__extends(MemberListPeoplePicker, _super);
        function MemberListPeoplePicker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return MemberListPeoplePicker;
    }(BasePicker_1.BasePickerListBelow));
    exports.MemberListPeoplePicker = MemberListPeoplePicker;
    /**
     * Standard People Picker.
     */
    var NormalPeoplePicker = (function (_super) {
        tslib_1.__extends(NormalPeoplePicker, _super);
        function NormalPeoplePicker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return NormalPeoplePicker;
    }(BasePeoplePicker));
    NormalPeoplePicker.defaultProps = {
        onRenderItem: function (props) { return React.createElement(SelectedItemDefault_1.SelectedItemDefault, tslib_1.__assign({}, props)); },
        onRenderSuggestionsItem: function (props, itemProps) { return SuggestionItemDefault_1.SuggestionItemNormal(tslib_1.__assign({}, props), tslib_1.__assign({}, itemProps)); },
        createGenericItem: createGenericItem
    };
    exports.NormalPeoplePicker = NormalPeoplePicker;
    /**
    * Compact layout. It uses small personas when displaying search results.
    */
    var CompactPeoplePicker = (function (_super) {
        tslib_1.__extends(CompactPeoplePicker, _super);
        function CompactPeoplePicker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return CompactPeoplePicker;
    }(BasePeoplePicker));
    CompactPeoplePicker.defaultProps = {
        onRenderItem: function (props) { return React.createElement(SelectedItemDefault_1.SelectedItemDefault, tslib_1.__assign({}, props)); },
        onRenderSuggestionsItem: function (props, itemProps) { return SuggestionItemDefault_1.SuggestionItemSmall(tslib_1.__assign({}, props), tslib_1.__assign({}, itemProps)); },
        createGenericItem: createGenericItem
    };
    exports.CompactPeoplePicker = CompactPeoplePicker;
    /**
     * MemberList layout. The selected people show up below the search box.
     */
    var ListPeoplePicker = (function (_super) {
        tslib_1.__extends(ListPeoplePicker, _super);
        function ListPeoplePicker() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        return ListPeoplePicker;
    }(MemberListPeoplePicker));
    ListPeoplePicker.defaultProps = {
        onRenderItem: function (props) { return React.createElement(SelectedItemDefault_1.SelectedItemDefault, tslib_1.__assign({}, props)); },
        onRenderSuggestionsItem: function (props, itemProps) { return SuggestionItemDefault_1.SuggestionItemNormal(tslib_1.__assign({}, props), tslib_1.__assign({}, itemProps)); },
        createGenericItem: createGenericItem
    };
    exports.ListPeoplePicker = ListPeoplePicker;
    function createGenericItem(name, currentValidationState) {
        var personaToConvert = {
            key: name,
            primaryText: name,
            imageInitials: '!',
            ValidationState: currentValidationState
        };
        if (currentValidationState !== BasePicker_Props_1.ValidationState.warning) {
            personaToConvert.imageInitials = Utilities_1.getInitials(name, Utilities_1.getRTL());
        }
        return personaToConvert;
    }
    exports.createGenericItem = createGenericItem;
});

//# sourceMappingURL=PeoplePicker.js.map
