import { __assign } from "tslib";
import * as React from 'react';
import { Fabric, Icon, Label, Toggle } from '@fluentui/react';
import { useBoolean } from '@fluentui/react-hooks';
import { Tabs, TabItem } from '@fluentui/react-tabs';
export var TabsOverflowMenuExample = function () {
    var _a = useBoolean(true), overflow = _a[0], toggleOverflow = _a[1].toggle;
    var _b = useBoolean(false), tabs = _b[0], toggleTabs = _b[1].toggle;
    var _c = useBoolean(false), rtl = _c[0], toggleRtl = _c[1].toggle;
    return (React.createElement(React.Fragment, null,
        React.createElement(Fabric // eslint-disable-line deprecation/deprecation
        , { dir: rtl ? 'rtl' : 'ltr' },
            React.createElement(Tabs, { "aria-label": "Tabs Overflow Menu Example", tabFormat: tabs ? 'tabs' : 'links', overflowBehavior: overflow ? 'menu' : 'none' },
                React.createElement(TabItem, { headerText: "My Files" },
                    React.createElement(Label, null, "Tab #1")),
                React.createElement(TabItem, { itemCount: 23, itemIcon: "Recent" },
                    React.createElement(Label, null, "Tab #2")),
                React.createElement(TabItem, { headerText: "Placeholder", itemIcon: "Globe" },
                    React.createElement(Label, null, "Tab #3")),
                React.createElement(TabItem, { headerText: "Shared with me", itemIcon: "Ringer", itemCount: 1 },
                    React.createElement(Label, null, "Tab #4")),
                React.createElement(TabItem, { headerText: "Custom Renderer", itemIcon: "Airplane", onRenderTab: _customRenderer },
                    React.createElement(Label, null, "Tab #5")),
                React.createElement(TabItem, { headerText: "This tab has a relatively long title" },
                    React.createElement(Label, null, "Tab #6")),
                React.createElement(TabItem, { headerText: "Short" },
                    React.createElement(Label, null, "Tab #7")),
                React.createElement(TabItem, { headerText: "The Last Tab" },
                    React.createElement(Label, null, "Tab #8")))),
        React.createElement("div", { style: { background: '#EEE', marginTop: 10 } },
            React.createElement(Toggle, { label: "overflow", offText: "none", onText: "menu", checked: overflow, onChange: toggleOverflow }),
            React.createElement(Toggle, { label: "tabFormat", offText: "links", onText: "tabs", checked: tabs, onChange: toggleTabs }),
            React.createElement(Toggle, { label: "direction", offText: "ltr", onText: "rtl", checked: rtl, onChange: toggleRtl }))));
};
function _customRenderer(tab, defaultRenderer) {
    if (!tab || !defaultRenderer) {
        return null;
    }
    return (React.createElement("span", { style: { flex: '0 1 100%' } },
        defaultRenderer(__assign(__assign({}, tab), { itemIcon: undefined })),
        React.createElement(Icon, { iconName: tab.itemIcon, style: { color: 'red' } })));
}
//# sourceMappingURL=Tabs.OverflowMenu.Example.js.map