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__Layout_BaseLayout_mjs__ from "../Layout/BaseLayout.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__ColorModeSwitch_mjs__ from "./ColorModeSwitch.mjs";
describe('ColorModeSwitch', ()=>{
    test('should render initial light color successul', async ()=>{
        // 1. We need to render the layout to get the 'body' class
        // 2. BaseLayout does not contain ColorModeSwitch so we need to import it
        window.localStorage.setItem('chakra-ui-color-mode', 'light');
        (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__Layout_BaseLayout_mjs__["default"], {
            sidebar: false
        }, " Content "), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__ColorModeSwitch_mjs__["default"], null)));
        expect(window.document.body.classList.contains('chakra-ui-light')).toBeTruthy();
        expect(window.document.body.classList.contains('chakra-ui-dark')).toBeFalsy();
        expect(__WEBPACK_EXTERNAL_MODULE__testing_library_react__.screen.getByLabelText('Switch to dark mode')).toBeVisible();
    });
});
