import * as __WEBPACK_EXTERNAL_MODULE__testing_library_react__ from "@testing-library/react";
import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom__ from "react-router-dom";
import * as __WEBPACK_EXTERNAL_MODULE__Sidebar_mjs__ from "./Sidebar.mjs";
import * as __WEBPACK_EXTERNAL_MODULE_react_icons_md__ from "react-icons/md";
const sidebarDefaultItems = [
    {
        title: 'Internal 1',
        to: '/1',
        icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdSearch
    },
    {
        title: 'Internal 2',
        to: '/2',
        icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdHelpOutline
    },
    {
        title: 'Internal 3',
        to: '/3',
        icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdFavoriteBorder
    },
    {
        title: 'External',
        to: 'https://redpanda.com',
        icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdPayment,
        isExternal: true
    },
    {
        title: 'Disabled',
        to: '/4',
        icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdPersonOutline,
        isDisabled: true,
        disabledText: 'Reason link is disabled'
    }
];
const sideBarMultiHeadingGroups = [
    {
        heading: 'Menu heading 1',
        items: [
            {
                title: 'Internal 1',
                to: '/1',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdSearch
            },
            {
                title: 'Internal 2',
                to: '/2',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdHelpOutline
            },
            {
                title: 'Internal 3',
                to: '/3',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdFavoriteBorder
            },
            {
                title: 'External 1',
                to: 'https://redpanda.com',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdPayment,
                isExternal: true
            }
        ]
    },
    {
        heading: 'Menu heading 2',
        items: [
            {
                title: 'Settings',
                to: '/settings',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdOutlineSettings
            },
            {
                title: 'Account',
                to: '/account',
                icon: __WEBPACK_EXTERNAL_MODULE_react_icons_md__.MdPersonOutline
            }
        ]
    }
];
describe('Sidebar', ()=>{
    test('should render menu items, with no heading', ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE_react_router_dom__.BrowserRouter, null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Sidebar_mjs__["default"], {
            items: sidebarDefaultItems
        })));
        const link = __WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.queryByText('Internal 1');
        const heading = __WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.queryByText('Menu heading 1');
        expect(link).toBeInTheDocument();
        expect(heading).not.toBeInTheDocument();
    });
    test('should render heading and menu items', ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__testing_library_react__.render)(/*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE_react_router_dom__.BrowserRouter, null, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__Sidebar_mjs__["default"], {
            groups: sideBarMultiHeadingGroups
        })));
        const link = __WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.queryByText('Internal 1');
        const heading = __WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.queryByText('Menu heading 1');
        expect(link).toBeInTheDocument();
        expect(heading).toBeInTheDocument();
    });
});
