"use strict";

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

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

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

var _styletronReact = require("styletron-react");

var _examplesList = _interopRequireDefault(require("./examples-list.js"));

var _tests$ALL_BASIC_COLO;

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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

var tagStyleKinds = Object.keys(_index.KIND);

var _default = (_tests$ALL_BASIC_COLO = {}, _defineProperty(_tests$ALL_BASIC_COLO, _examplesList.default.ALL_BASIC_COLORS, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, React.createElement(_index.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(_index.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, _examplesList.default.WITH_CUSTOM_COLORS, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, ['#000000', '#00ff35'].map(function (color) {
    return React.createElement(_index.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: (0, _styletronReact.withStyle)(_index.StyledRoot, function (props) {
          return {
            color: props.$color
          };
        })
      }
    }, "Color ", color);
  })));
}), _defineProperty(_tests$ALL_BASIC_COLO, _examplesList.default.DISABLED, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, tagStyleKinds.map(function (kind) {
    return React.createElement(_index.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, _examplesList.default.UNCLOSEABLE, function () {
  return React.createElement(React.Fragment, null, React.createElement("div", {
    style: {
      width: '200px'
    }
  }, tagStyleKinds.map(function (kind) {
    return React.createElement(_index.Tag, {
      key: kind,
      kind: kind,
      color: kind === 'custom' ? '#748ecc' : undefined,
      closeable: false
    }, "kind ", kind);
  })));
}), _tests$ALL_BASIC_COLO);

exports.default = _default;