import React from "react";
import Text from "../../components/atoms/text/text";
import { render } from "@testing-library/react-native";
import { ThemeProvider } from "../../theme/src/theme-context";
import { useAccessibleColor } from "../useAccessibleColor";
jest.useFakeTimers();
const TestComponent = props => {
  const accessibleColor = useAccessibleColor(props.bgColor);
  return /*#__PURE__*/React.createElement(Text, null, accessibleColor);
};
describe("useAccessibleColor", () => {
  it("shows the correct color for theme colors (light bg)", () => {
    const comp = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(TestComponent, {
      bgColor: "neutral.50"
    })));
    expect(comp.getByText("black")).toBeTruthy();
  });
  it("shows the correct color for theme colors (dark bg)", () => {
    const comp = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(TestComponent, {
      bgColor: "neutral.900"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
  it("shows the correct color for named colors", () => {
    const comp = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(TestComponent, {
      bgColor: "navy"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
  it("shows the correct color for raw hex colors", () => {
    const comp = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(TestComponent, {
      bgColor: "#000300"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
});
//# sourceMappingURL=useAccessibleColor.spec.js.map