"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.tests = exports.suite = void 0;

var React = _interopRequireWildcard(require("react"));

var _index = require("../styles/index.js");

var _index2 = require("./index.js");

var _tests$SIMPLE_EXAMPLE;

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

var suite = 'Component Test Suite';
exports.suite = suite;
var tests = {
  SIMPLE_EXAMPLE: 'Stateless component',
  STATEFUL_EXAMPLE: 'Stateful component',
  STYLE_PROPS_OVERRIDES: 'Component style and props overrides',
  STYLED_COMPONENT_OVERRIDES: 'Styled components overrides'
};
exports.tests = tests;
var Span = (0, _index.styled)('span', function (_ref) {
  var $prop = _ref.$prop,
      $theme = _ref.$theme;
  return {
    color: $prop ? $theme.colors.positive : $theme.colors.warning
  };
});
Span.displayName = "Span";

var CustomRoot = function CustomRoot(_ref2) {
  var children = _ref2.children,
      rest = _objectWithoutProperties(_ref2, ["children"]);

  return React.createElement(_index2.StyledRoot, rest, React.createElement(Span, rest, children));
};

var _default = (_tests$SIMPLE_EXAMPLE = {}, _defineProperty(_tests$SIMPLE_EXAMPLE, tests.SIMPLE_EXAMPLE, function Story1() {
  return React.createElement(_index2.Component, null, "Component");
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_EXAMPLE, function Story2() {
  return React.createElement(_index2.StatefulComponent, null, "Component");
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STYLE_PROPS_OVERRIDES, function Story3() {
  return React.createElement(_index2.StatefulComponent, {
    initialState: {
      prop: false
    },
    overrides: {
      Root: {
        props: {
          'data-label': 'data-label'
        },
        style: {
          cursor: 'wait'
        }
      }
    }
  }, "Component");
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STYLED_COMPONENT_OVERRIDES, function Story3() {
  return React.createElement(_index2.StatefulComponent, {
    overrides: {
      Root: {
        component: CustomRoot
      }
    }
  }, "Component");
}), _tests$SIMPLE_EXAMPLE);

exports.default = _default;