"use strict";

var _react = _interopRequireDefault(require("react"));
var _text = _interopRequireDefault(require("../../components/atoms/text/text"));
var _reactNative = require("@testing-library/react-native");
var _themeContext = require("../../theme/src/theme-context");
var _useAccessibleColor = require("../useAccessibleColor");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
jest.useFakeTimers();
const TestComponent = props => {
  const accessibleColor = (0, _useAccessibleColor.useAccessibleColor)(props.bgColor);
  return /*#__PURE__*/_react.default.createElement(_text.default, null, accessibleColor);
};
describe("useAccessibleColor", () => {
  it("shows the correct color for theme colors (light bg)", () => {
    const comp = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(TestComponent, {
      bgColor: "neutral.50"
    })));
    expect(comp.getByText("black")).toBeTruthy();
  });
  it("shows the correct color for theme colors (dark bg)", () => {
    const comp = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(TestComponent, {
      bgColor: "neutral.900"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
  it("shows the correct color for named colors", () => {
    const comp = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(TestComponent, {
      bgColor: "navy"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
  it("shows the correct color for raw hex colors", () => {
    const comp = (0, _reactNative.render)( /*#__PURE__*/_react.default.createElement(_themeContext.ThemeProvider, null, /*#__PURE__*/_react.default.createElement(TestComponent, {
      bgColor: "#000300"
    })));
    expect(comp.getByText("white")).toBeTruthy();
  });
});
//# sourceMappingURL=useAccessibleColor.spec.js.map