import _map from "lodash/fp/map";
import React from 'react';
import ButtonLinkIcon from '../../../atom/button-link-icon';
import PrivacyPolicyContact from '../../../molecule/privacy-policy-contact';
import { propTypes } from './types';
import styles from './style.css';

// @ts-expect-error (need to get the index)
const mapWithIndex = _map.convert({
  cap: false
});
const FAQArticlePage = ({
  title,
  backButton,
  backButtonText,
  subArticles,
  privacyPolicyContact
}) => {
  return /*#__PURE__*/React.createElement("div", {
    className: styles.wrapper
  }, /*#__PURE__*/React.createElement("div", {
    className: styles.page
  }, /*#__PURE__*/React.createElement("div", {
    className: styles.container
  }, /*#__PURE__*/React.createElement("div", {
    className: styles.backContainer
  }, /*#__PURE__*/React.createElement(ButtonLinkIcon, backButton), /*#__PURE__*/React.createElement("span", null, backButtonText)), /*#__PURE__*/React.createElement("h1", {
    className: styles.title
  }, title), mapWithIndex((item, index) => {
    return /*#__PURE__*/React.createElement("div", {
      className: styles.article,
      key: `${item.text}${index}`
    }, /*#__PURE__*/React.createElement("h3", {
      className: styles.subTitle
    }, item.subTitle), /*#__PURE__*/React.createElement("div", {
      className: styles.text
      // eslint-disable-next-line react/no-danger
      ,
      dangerouslySetInnerHTML: {
        __html: item.text
      }
    }), /*#__PURE__*/React.createElement("img", {
      className: styles.img,
      src: item.image,
      alt: ""
    }));
  }, subArticles), /*#__PURE__*/React.createElement("div", {
    className: styles.backContainerMobile
  }, /*#__PURE__*/React.createElement(ButtonLinkIcon, backButton), /*#__PURE__*/React.createElement("span", null, backButtonText)))), /*#__PURE__*/React.createElement("div", {
    className: styles.privacyPolicyContact
  }, /*#__PURE__*/React.createElement(PrivacyPolicyContact, privacyPolicyContact)));
};
FAQArticlePage.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {};
export default FAQArticlePage;
//# sourceMappingURL=index.js.map