"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CoalitionCollapsible = void 0;
require("core-js/modules/es.object.assign.js");
var _react = _interopRequireDefault(require("react"));
var _reactCollapsed = _interopRequireDefault(require("react-collapsed"));
var _svgs = require("../../svgs");
var _utils = require("../../utils");
require("./CoalitionCollapsible.css");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
const CoalitionCollapsible = _ref => {
  let {
    terms = null
  } = _ref;
  const {
    getCollapseProps,
    getToggleProps,
    isExpanded
  } = (0, _reactCollapsed.default)();
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, terms && terms.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
    className: "coalition-card-available-detail-terms-conditions"
  }, /*#__PURE__*/_react.default.createElement("div", {
    className: "collapsible"
  }, /*#__PURE__*/_react.default.createElement("div", _extends({
    className: isExpanded ? "collapsible-open header" : "collapsible-closed header"
  }, getToggleProps()), "T\xE9rminos y Condiciones", /*#__PURE__*/_react.default.createElement("span", null, isExpanded ? /*#__PURE__*/_react.default.createElement(_svgs.ChevronUp, null) : /*#__PURE__*/_react.default.createElement(_svgs.ChevronDown, null))), /*#__PURE__*/_react.default.createElement("div", getCollapseProps(), /*#__PURE__*/_react.default.createElement(_utils.TermsAndConditions, {
    terms: terms
  })))) : null);
};
exports.CoalitionCollapsible = CoalitionCollapsible;