var _tests$SIMPLE_EXAMPLE;

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; }

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { styled } from '../styles/index.js';
import { Component, StatefulComponent, StyledRoot } from './index.js';
export var suite = 'Component Test Suite';
export var tests = {
  SIMPLE_EXAMPLE: 'Stateless component',
  STATEFUL_EXAMPLE: 'Stateful component',
  STYLE_PROPS_OVERRIDES: 'Component style and props overrides',
  STYLED_COMPONENT_OVERRIDES: 'Styled components overrides'
};
var Span = 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(StyledRoot, rest, React.createElement(Span, rest, children));
};

export default (_tests$SIMPLE_EXAMPLE = {}, _defineProperty(_tests$SIMPLE_EXAMPLE, tests.SIMPLE_EXAMPLE, function Story1() {
  return React.createElement(Component, null, "Component");
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STATEFUL_EXAMPLE, function Story2() {
  return React.createElement(StatefulComponent, null, "Component");
}), _defineProperty(_tests$SIMPLE_EXAMPLE, tests.STYLE_PROPS_OVERRIDES, function Story3() {
  return React.createElement(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(StatefulComponent, {
    overrides: {
      Root: {
        component: CustomRoot
      }
    }
  }, "Component");
}), _tests$SIMPLE_EXAMPLE);