"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _typeof = require("@babel/runtime/helpers/typeof");

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

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

var _utils = require("../../../.storybook/utils");

var Icons = _interopRequireWildcard(require("@teamleader/ui-icons"));

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

var _description = _interopRequireDefault(require("./description.md"));

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

var gridStyles = {
  display: 'flex',
  flexWrap: 'wrap'
};
var itemStyles = {
  alignItems: 'center',
  display: 'flex',
  width: '320px',
  whiteSpace: 'nowrap'
};
var _default = {
  component: _index.Icon,
  title: (0, _utils.addStoryInGroup)(_utils.LOW_LEVEL_BLOCKS, 'Icon'),
  parameters: {
    docs: {
      description: {
        component: _description.default
      }
    }
  }
};
exports.default = _default;

var DefaultStory = function DefaultStory(args) {
  return /*#__PURE__*/_react.default.createElement(_index.Icon, args, /*#__PURE__*/_react.default.createElement(Icons.IconWarningBadgedMediumOutline, null));
};

exports.DefaultStory = DefaultStory;

var Overview14x14 = function Overview14x14() {
  return /*#__PURE__*/_react.default.createElement(_index.Box, {
    style: gridStyles
  }, Object.keys(Icons).map(function (key, index) {
    if (key.includes('Small')) {
      var IconToRender = Icons[key];
      return /*#__PURE__*/_react.default.createElement(_index.Box, {
        element: "span",
        key: index,
        style: itemStyles,
        padding: 3
      }, /*#__PURE__*/_react.default.createElement(_index.Icon, null, /*#__PURE__*/_react.default.createElement(IconToRender, null)), /*#__PURE__*/_react.default.createElement(_index.TextSmall, {
        marginLeft: 3,
        style: {
          display: 'inline-block'
        }
      }, key));
    }

    return null;
  }));
};

exports.Overview14x14 = Overview14x14;

var Overview24x24 = function Overview24x24() {
  return /*#__PURE__*/_react.default.createElement(_index.Box, {
    style: gridStyles
  }, Object.keys(Icons).map(function (key, index) {
    if (key.includes('Medium')) {
      var IconToRender = Icons[key];
      return /*#__PURE__*/_react.default.createElement(_index.Box, {
        element: "span",
        key: index,
        style: itemStyles,
        padding: 3
      }, /*#__PURE__*/_react.default.createElement(_index.Icon, null, /*#__PURE__*/_react.default.createElement(IconToRender, null)), /*#__PURE__*/_react.default.createElement(_index.TextSmall, {
        marginLeft: 3,
        style: {
          display: 'inline-block'
        }
      }, key));
    }

    return null;
  }));
};

exports.Overview24x24 = Overview24x24;