define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/CommandBar", "office-ui-fabric-react/lib/Toggle"], function (require, exports, tslib_1, React, Utilities_1, CommandBar_1, Toggle_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var CommandBarBasicExample = (function (_super) {
        tslib_1.__extends(CommandBarBasicExample, _super);
        function CommandBarBasicExample(props) {
            var _this = _super.call(this, props) || this;
            _this.state = {
                isSearchBoxVisible: true,
                areNamesVisible: true,
                areIconsVisible: true
            };
            return _this;
        }
        CommandBarBasicExample.prototype.render = function () {
            var _this = this;
            var _a = this.props, items = _a.items, farItems = _a.farItems;
            var _b = this.state, searchBoxVisible = _b.isSearchBoxVisible, iconsVisible = _b.areIconsVisible, namesVisible = _b.areNamesVisible;
            var filteredItems = items.map(function (item) { return Utilities_1.assign({}, item, {
                name: namesVisible ? item.name : '',
                icon: iconsVisible ? item.icon : ''
            }); });
            var filteredFarItems = farItems.map(function (item) { return Utilities_1.assign({}, item, {
                name: namesVisible ? item.name : '',
                icon: iconsVisible ? item.icon : ''
            }); });
            return (React.createElement("div", null,
                React.createElement(Toggle_1.Toggle, { label: 'Show search box', checked: searchBoxVisible, onChanged: function (isSearchBoxVisible) { return _this.setState({ isSearchBoxVisible: isSearchBoxVisible }); }, onText: 'Visible', offText: 'Hidden' }),
                React.createElement(Toggle_1.Toggle, { label: 'Show names', checked: namesVisible, onChanged: function (areNamesVisible) { return _this.setState({ areNamesVisible: areNamesVisible }); }, onText: 'Visible', offText: 'Hidden' }),
                React.createElement(Toggle_1.Toggle, { label: 'Show icons', checked: iconsVisible, onChanged: function (areIconsVisible) { return _this.setState({ areIconsVisible: areIconsVisible }); }, onText: 'Visible', offText: 'Hidden' }),
                React.createElement(CommandBar_1.CommandBar, { isSearchBoxVisible: searchBoxVisible, searchPlaceholderText: 'Search...', elipisisAriaLabel: 'More options', items: filteredItems, farItems: filteredFarItems })));
        };
        return CommandBarBasicExample;
    }(React.Component));
    exports.CommandBarBasicExample = CommandBarBasicExample;
});

//# sourceMappingURL=CommandBar.Basic.Example.js.map
