"use strict";

exports.__esModule = true;
exports.default = exports.IconBlock = exports.Wrapper = void 0;

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

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _Icon = _interopRequireDefault(require("./Icon"));

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

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var Wrapper = _styledComponents.default.div.withConfig({
  displayName: "Spritesheet__Wrapper",
  componentId: "sc-1hlkslc-0"
})(["display:flex;flex-wrap:wrap;justify-content:space-around;overflow-y:auto;height:100%;"]);

exports.Wrapper = Wrapper;

var IconBlock = _styledComponents.default.div.withConfig({
  displayName: "Spritesheet__IconBlock",
  componentId: "sc-1hlkslc-1"
})(["flex:0 0 30%;border:1px solid #999;margin:5px;padding:5px 10px;font-size:24px;"]);

exports.IconBlock = IconBlock;

var arrify = function arrify(thing) {
  return [].slice.call(thing);
};

var SpriteSheet = function SpriteSheet() {
  var iconIds = arrify(document.querySelectorAll('symbol[id^="icon-"]')).map(function (elm) {
    return elm.id.replace(/^icon-/, "");
  });
  return /*#__PURE__*/_react.default.createElement(Wrapper, null, iconIds.map(function (id) {
    return /*#__PURE__*/_react.default.createElement(IconBlock, {
      key: id
    }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
      id: id
    }), " ", id);
  }));
};

var _default = SpriteSheet;
var _default2 = _default;
var _default3 = _default2;
exports.default = _default3;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(IconBlock, "IconBlock", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(arrify, "arrify", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(SpriteSheet, "SpriteSheet", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(_default, "default", "/home/vsts/work/1/s/src/components/Spritesheet.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(Wrapper, "Wrapper", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(IconBlock, "IconBlock", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(arrify, "arrify", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(SpriteSheet, "SpriteSheet", "/home/vsts/work/1/s/src/components/Spritesheet.js");
  reactHotLoader.register(_default2, "default", "/home/vsts/work/1/s/src/components/Spritesheet.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();