"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }

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

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

var _Box = _interopRequireDefault(require("../../../box/Box"));

var _Button = _interopRequireDefault(require("../../../buttons/Button"));

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

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

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

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

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 sizes = {
  listitem: {
    width: 'auto',
    height: 48
  },
  small: {
    width: 150,
    height: 100
  },
  medium: {
    width: 300,
    height: 200
  },
  large: {
    width: 600,
    height: 400
  }
};
var colors = {
  red: 'red-40',
  yellow: 'yellow-40',
  blue: 'blue-40'
};
var DummyBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
  var size = _ref.size,
      color = _ref.color,
      onClick = _ref.onClick;
  return /*#__PURE__*/React.createElement(_Box.default, {
    ref: ref,
    color: colors[color],
    padding: "xs",
    onClick: onClick,
    style: _objectSpread(_objectSpread({}, sizes[size]), {}, {
      cursor: onClick === undefined ? 'default' : 'pointer'
    })
  }, onClick !== undefined && size === 'listitem' && /*#__PURE__*/React.createElement(_Button.default, {
    size: "s",
    icon: /*#__PURE__*/React.createElement(_Icon.default, {
      type: "close",
      size: 24
    }),
    variant: "transparent-inverted",
    iconOnly: true
  }));
});
var _default = DummyBox;
exports.default = _default;