import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose";
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";

var _templateObject;

import { useUIFunctions, useConfigState } from '@sentecacommerce-theme/lib';
import React from 'react';
import styled from 'styled-components';
import { Modal } from '../../';
export var ItemDescription = (_ref) => {
  var {
    content
  } = _ref,
      props = _objectWithoutPropertiesLoose(_ref, ["content", "handleClose"]);

  var {
    closeViewById
  } = useUIFunctions();
  var {
    views
  } = useConfigState();
  return /*#__PURE__*/React.createElement(Modal, _extends({
    open: true,
    handleClose: () => closeViewById(views.itemDesc)
  }, props), /*#__PURE__*/React.createElement(Container, null, content == null ? void 0 : content.map((info, index) => {
    var _info$content;

    return /*#__PURE__*/React.createElement("div", {
      dangerouslySetInnerHTML: {
        __html: (_info$content = info == null ? void 0 : info.content) != null ? _info$content : ''
      },
      key: "Info__" + (info.name || index)
    });
  })));
};
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  position: relative;\n  background-color: #fff;\n  padding: 3rem 3rem 3rem;\n"])));
//# sourceMappingURL=index.js.map