"use strict";

require("./demo1.css");

var _reactCopyToClipboard = _interopRequireDefault(require("react-copy-to-clipboard"));

var _ = _interopRequireDefault(require(".."));

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

var _2 = require("../..");

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

// @ts-ignore
var types = ['smile', 'cry', 'success', 'warning', 'prompt', 'error', 'help', 'clock', 'success-filling', 'delete-filling', 'favorites-filling', 'add', 'minus', 'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-double-left', 'arrow-double-right', 'switch', 'sorting', 'descending', 'ascending', 'select', 'semi-select', 'loading', 'search', 'close', 'ellipsis', 'picture', 'calendar', 'ashbin', 'upload', 'download', 'set', 'edit', 'refresh', 'filter', 'attachment', 'account', 'email', 'atm', 'copy', 'exit', 'eye', 'eye-close', 'toggle-left', 'toggle-right', 'lock', 'unlock', 'chart-pie', 'chart-bar', 'form', 'detail', 'list', 'dashboard'];
var customTypes = []; // The code here is for fusion dev display custom Icon components only

if ('customIcons' in window) {
  customTypes = window.customIcons;
}

var handleCopy = function handleCopy() {
  return _2.Message.success('Copied!');
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
  className: "icon-list-title"
}, "Click on the icon to copy the code."), /*#__PURE__*/_react["default"].createElement("ul", {
  className: "icon-list"
}, types.map(function (type, index) {
  return /*#__PURE__*/_react["default"].createElement(_reactCopyToClipboard["default"], {
    key: index,
    text: "<Icon type=\"".concat(type, "\" />"),
    onCopy: handleCopy
  }, /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
    type: type,
    size: "xl"
  }), /*#__PURE__*/_react["default"].createElement("span", null, type)));
})), customTypes.length ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
  className: "icon-list-custom-title"
}, "Custom Icon"), /*#__PURE__*/_react["default"].createElement("ul", {
  className: "icon-list"
}, customTypes.map(function (type, index) {
  return /*#__PURE__*/_react["default"].createElement(_reactCopyToClipboard["default"], {
    key: index,
    text: "<Icon type=\"".concat(type, "\" />"),
    onCopy: handleCopy
  }, /*#__PURE__*/_react["default"].createElement("li", null, /*#__PURE__*/_react["default"].createElement(_["default"], {
    type: type,
    size: "xl"
  }), /*#__PURE__*/_react["default"].createElement("span", null, type)));
}))) : null), document.getElementById('icon-demo-1'));