var _tests$ALL_BASIC_COLO;

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

/*
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.
*/

/* eslint-disable react/display-name*/
import * as React from 'react'; // Styled elements

import { Tag, KIND, StyledRoot } from './index.js';
import { withStyle } from 'styletron-react';
import tests from './examples-list.js';
var tagStyleKinds = Object.keys(KIND);
export default (_tests$ALL_BASIC_COLO = {}, _defineProperty(_tests$ALL_BASIC_COLO, tests.ALL_BASIC_COLORS, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, React.createElement(Tag, {
    key: "default",
    onActionClick: function onActionClick(e, tag) {
      if (typeof tag === 'string') {
        // eslint-disable-next-line no-console
        console.log('Tag is clicked:' + tag);
      }
    }
  }, "Default Color"), tagStyleKinds.map(function (kind) {
    return React.createElement(Tag, {
      key: kind,
      kind: kind,
      color: kind === 'custom' ? '#748ecc' : undefined,
      onActionClick: function onActionClick(e, tag) {
        if (typeof tag === 'string') {
          // eslint-disable-next-line no-console
          console.log('Tag is clicked:' + tag);
        }
      }
    }, "kind ", kind);
  })));
}), _defineProperty(_tests$ALL_BASIC_COLO, tests.WITH_CUSTOM_COLORS, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, ['#000000', '#00ff35'].map(function (color) {
    return React.createElement(Tag, {
      key: color,
      color: color,
      kind: "custom",
      onActionClick: function onActionClick(e, tag) {
        if (typeof tag === 'string') {
          // eslint-disable-next-line no-console
          console.log('Tag is clicked:' + tag);
        }
      },
      overrides: {
        Root: withStyle(StyledRoot, function (props) {
          return {
            color: props.$color
          };
        })
      }
    }, "Color ", color);
  })));
}), _defineProperty(_tests$ALL_BASIC_COLO, tests.DISABLED, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, tagStyleKinds.map(function (kind) {
    return React.createElement(Tag, {
      disabled: true,
      key: kind,
      kind: kind,
      onActionClick: function onActionClick(e) {
        var tag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';

        if (typeof tag === 'string') {
          // eslint-disable-next-line no-console
          console.log('Tag is clicked:' + tag);
        }
      }
    }, "kind ", kind);
  })));
}), _defineProperty(_tests$ALL_BASIC_COLO, tests.UNCLOSEABLE, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, tagStyleKinds.map(function (kind) {
    return React.createElement(Tag, {
      key: kind,
      kind: kind,
      color: kind === 'custom' ? '#748ecc' : undefined,
      closeable: false
    }, "kind ", kind);
  })));
}), _tests$ALL_BASIC_COLO);