"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _reactNativeModal = _interopRequireDefault(require("react-native-modal"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _index = _interopRequireDefault(require("../../hoc/touchable/index.native"));
var _templateContext = require("../../template/app-review/template-context");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const createStyleSheet = theme => _reactNative.StyleSheet.create({
  modalView: {
    backgroundColor: '#fff',
    margin: 5,
    borderRadius: 20
  },
  textsContainer: {
    display: 'flex',
    alignItems: 'center',
    marginVertical: theme.spacing.large,
    marginHorizontal: theme.spacing.base
  },
  icon: {
    width: 76,
    height: 76
  },
  title: {
    color: '#1D1D2B',
    fontWeight: theme.fontWeight.bold,
    fontSize: 20,
    lineHeight: 28,
    marginVertical: theme.spacing.small
  },
  descriptionText: {
    color: '#515161',
    fontWeight: theme.fontWeight.semiBold,
    fontSize: 14,
    lineHeight: 20,
    textAlign: 'center'
  },
  buttonContainer: {
    marginHorizontal: theme.spacing.base
  },
  buttonText: {
    fontWeight: theme.fontWeight.bold,
    fontSize: 14,
    lineHeight: 20,
    marginVertical: 12,
    textAlign: 'center'
  },
  secondButton: {
    backgroundColor: theme.colors.cta,
    borderRadius: 7,
    marginBottom: theme.spacing.small
  },
  secondButtonText: {
    color: theme.colors.white
  },
  firstButton: {
    borderRadius: 7,
    marginBottom: theme.spacing.small
  },
  firstButtonText: {
    color: '#ED3436'
  }
});
const QuitPopinReview = props => {
  const {
    content,
    descriptionText,
    firstButton,
    secondButton
  } = props;
  const templateContext = (0, _templateContext.useTemplateContext)();
  const [styleSheet, setStylesheet] = (0, _react.useState)(null);
  const {
    theme
  } = templateContext;
  (0, _react.useEffect)(() => {
    const _stylesheet = createStyleSheet(theme);
    setStylesheet(_stylesheet);
  }, [theme]);
  if (!styleSheet) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_reactNativeModal.default, {
    isVisible: true,
    animationIn: "fadeIn",
    animationOut: "fadeOut"
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styleSheet.modalView
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styleSheet.textsContainer
  }, /*#__PURE__*/_react.default.createElement(_novaIcons.NovaSolidSpaceMoonRocket, {
    style: styleSheet.icon,
    color: "#06265B"
  }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: styleSheet.title
  }, content), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: styleSheet.descriptionText
  }, descriptionText)), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styleSheet.buttonContainer
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
    style: styleSheet.secondButton,
    onPress: secondButton?.handleOnclick,
    accessibilityLabel: secondButton?.['aria-label'],
    testID: "second-button"
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: [styleSheet.buttonText, styleSheet.secondButtonText]
  }, secondButton?.label)), /*#__PURE__*/_react.default.createElement(_index.default, {
    style: styleSheet.firstButton,
    isHighlight: true,
    onPress: firstButton?.handleOnclick,
    accessibilityLabel: firstButton?.['aria-label'],
    testID: "first-button"
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: [styleSheet.buttonText, styleSheet.firstButtonText]
  }, firstButton?.label)))));
};
var _default = exports.default = QuitPopinReview;
//# sourceMappingURL=index.native.js.map