define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/Button", "office-ui-fabric-react/lib/ResizeGroup", "../../OverflowSet", "./ResizeGroup.Example.scss", "./data"], function (require, exports, tslib_1, React, Utilities_1, Button_1, ResizeGroup_1, OverflowSet_1, stylesImport, data_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var styles = stylesImport;
    var ResizeGroupOverflowSetExample = (function (_super) {
        tslib_1.__extends(ResizeGroupOverflowSetExample, _super);
        function ResizeGroupOverflowSetExample(props) {
            var _this = _super.call(this, props) || this;
            _this.state = {
                short: false
            };
            return _this;
        }
        ResizeGroupOverflowSetExample.prototype.render = function () {
            return (React.createElement("div", { className: this.state.short ? styles.resizeIsShort : 'notResized' },
                React.createElement(ResizeGroup_1.ResizeGroup, { data: data_1.data, onReduceData: function (currentdata) {
                        if (currentdata.primary.length === 0) {
                            return undefined;
                        }
                        var overflow = currentdata.overflow.concat(currentdata.primary.slice(-1));
                        var primary = currentdata.primary.slice(0, -1);
                        return { primary: primary, overflow: overflow };
                    }, onRenderData: function (data) {
                        return (React.createElement(OverflowSet_1.OverflowSet, { items: data.primary, overflowItems: data.overflow.length ? data.overflow : null, onRenderItem: function (item) {
                                return (React.createElement(Button_1.DefaultButton, { text: item.name, iconProps: { iconName: item.icon }, onClick: item.onClick }));
                            }, onRenderOverflowButton: function (overflowItems) {
                                return (React.createElement(Button_1.DefaultButton, { menuProps: { items: overflowItems } }));
                            } }));
                    } })));
        };
        return ResizeGroupOverflowSetExample;
    }(Utilities_1.BaseComponent));
    exports.ResizeGroupOverflowSetExample = ResizeGroupOverflowSetExample;
});

//# sourceMappingURL=ResizeGroup.OverflowSet.Example.js.map
