import React from "react";
import renderer from "react-test-renderer";
import { ThemeProvider } from "../src/theme-context";
import Box from "../../components/atoms/box/box";
import { baseTheme } from "../src/base/index";
jest.useFakeTimers();
describe("Color mode based color", () => {
  it("uses the light value in light theme", () => {
    const tree = renderer.create( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Box, {
      shadowColor: {
        light: "blue",
        dark: "brown"
      },
      borderColor: {
        light: "tomato",
        dark: "cyan"
      },
      backgroundColor: {
        light: "white",
        dark: "black"
      }
    }))).toJSON();
    expect(tree.children[0].props.style.shadowColor).toBe(baseTheme.palette.blue);
    expect(tree.children[0].props.style.borderColor).toBe(baseTheme.palette.tomato);
    expect(tree.children[0].props.style.backgroundColor).toBe(baseTheme.palette.white);
  });
  it("uses the light value in light theme", () => {
    const tree = renderer.create( /*#__PURE__*/React.createElement(ThemeProvider, {
      initialColorMode: "dark"
    }, /*#__PURE__*/React.createElement(Box, {
      shadowColor: {
        light: "blue",
        dark: "brown"
      },
      borderColor: {
        light: "tomato",
        dark: "cyan"
      },
      backgroundColor: {
        light: "white",
        dark: "black"
      }
    }))).toJSON();
    expect(tree.children[0].props.style.shadowColor).toBe(baseTheme.palette.brown);
    expect(tree.children[0].props.style.borderColor).toBe(baseTheme.palette.cyan);
    expect(tree.children[0].props.style.backgroundColor).toBe(baseTheme.palette.black);
  });
});
//# sourceMappingURL=color-mode-background-color.spec.js.map