"use strict";

exports.__esModule = true;
exports.default = void 0;
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
var _react = _interopRequireDefault(require("react"));
var _buttonLinkIcon = _interopRequireDefault(require("../../../atom/button-link-icon"));
var _privacyPolicyContact = _interopRequireDefault(require("../../../molecule/privacy-policy-contact"));
var _types = require("./types");
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
// @ts-expect-error (need to get the index)
const mapWithIndex = _map2.default.convert({
  cap: false
});
const FAQArticlePage = ({
  title,
  backButton,
  backButtonText,
  subArticles,
  privacyPolicyContact
}) => {
  return /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.wrapper
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.page
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.container
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.backContainer
  }, /*#__PURE__*/_react.default.createElement(_buttonLinkIcon.default, backButton), /*#__PURE__*/_react.default.createElement("span", null, backButtonText)), /*#__PURE__*/_react.default.createElement("h1", {
    className: _style.default.title
  }, title), mapWithIndex((item, index) => {
    return /*#__PURE__*/_react.default.createElement("div", {
      className: _style.default.article,
      key: `${item.text}${index}`
    }, /*#__PURE__*/_react.default.createElement("h3", {
      className: _style.default.subTitle
    }, item.subTitle), /*#__PURE__*/_react.default.createElement("div", {
      className: _style.default.text
      // eslint-disable-next-line react/no-danger
      ,
      dangerouslySetInnerHTML: {
        __html: item.text
      }
    }), /*#__PURE__*/_react.default.createElement("img", {
      className: _style.default.img,
      src: item.image,
      alt: ""
    }));
  }, subArticles), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.backContainerMobile
  }, /*#__PURE__*/_react.default.createElement(_buttonLinkIcon.default, backButton), /*#__PURE__*/_react.default.createElement("span", null, backButtonText)))), /*#__PURE__*/_react.default.createElement("div", {
    className: _style.default.privacyPolicyContact
  }, /*#__PURE__*/_react.default.createElement(_privacyPolicyContact.default, privacyPolicyContact)));
};
FAQArticlePage.propTypes = process.env.NODE_ENV !== "production" ? _types.propTypes : {};
var _default = exports.default = FAQArticlePage;
//# sourceMappingURL=index.js.map