define(["require", "exports", "tslib", "react", "office-ui-fabric-react", "@uifabric/react-hooks", "@fluentui/react-tabs"], function (require, exports, tslib_1, React, office_ui_fabric_react_1, react_hooks_1, react_tabs_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.PivotOverflowMenuExample = function () {
        var _a = react_hooks_1.useBoolean(true), overflow = _a[0], toggleOverflow = _a[1].toggle;
        var _b = react_hooks_1.useBoolean(false), tabs = _b[0], toggleTabs = _b[1].toggle;
        var _c = react_hooks_1.useBoolean(false), rtl = _c[0], toggleRtl = _c[1].toggle;
        return (React.createElement(React.Fragment, null,
            React.createElement("div", { style: { background: '#EEE' } },
                React.createElement(office_ui_fabric_react_1.Toggle, { label: "overflow", offText: "none", onText: "menu", checked: overflow, onChange: toggleOverflow }),
                React.createElement(office_ui_fabric_react_1.Toggle, { label: "linkFormat", offText: "links", onText: "tabs", checked: tabs, onChange: toggleTabs }),
                React.createElement(office_ui_fabric_react_1.Toggle, { label: "direction", offText: "ltr", onText: "rtl", checked: rtl, onChange: toggleRtl })),
            React.createElement(office_ui_fabric_react_1.Fabric, { dir: rtl ? 'rtl' : 'ltr' },
                React.createElement(react_tabs_1.Pivot, { "aria-label": "Pivot Overflow Menu Example", linkFormat: tabs ? 'tabs' : 'links', overflowBehavior: overflow ? 'menu' : 'none' },
                    React.createElement(react_tabs_1.PivotItem, { headerText: "My Files" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #1")),
                    React.createElement(react_tabs_1.PivotItem, { itemCount: 23, itemIcon: "Recent" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #2")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "Placeholder", itemIcon: "Globe" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #3")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "Shared with me", itemIcon: "Ringer", itemCount: 1 },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #4")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "Custom Renderer", itemIcon: "Airplane", onRenderItemLink: _customRenderer },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #5")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "This tab has a relatively long title" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #6")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "Short" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #7")),
                    React.createElement(react_tabs_1.PivotItem, { headerText: "The Last Tab" },
                        React.createElement(office_ui_fabric_react_1.Label, null, "Pivot #8"))))));
    };
    function _customRenderer(link, defaultRenderer) {
        if (!link || !defaultRenderer) {
            return null;
        }
        return (React.createElement("span", { style: { flex: '0 1 100%' } },
            defaultRenderer(tslib_1.__assign(tslib_1.__assign({}, link), { itemIcon: undefined })),
            React.createElement(office_ui_fabric_react_1.Icon, { iconName: link.itemIcon, style: { color: 'red' } })));
    }
});
//# sourceMappingURL=Pivot.OverflowMenu.Example.js.map