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); }
import React, { useEffect } from 'react';
import usePisellConfig from "../pisell-config-provider/hooks/usePisellConfig";
import { platformCpt } from "./components";
import { confirm, info, error, warn, warning, success } from "./components/functions";
import Information from "./components/Information";
var PisellModal = function PisellModal(props) {
  var platform = props.platform,
    _props$headerDivider = props.headerDivider,
    headerDivider = _props$headerDivider === void 0 ? true : _props$headerDivider,
    _props$footerDivider = props.footerDivider,
    footerDivider = _props$footerDivider === void 0 ? true : _props$footerDivider;
  var config = usePisellConfig();
  var ModalCpt = platformCpt[platform || config.platform];
  useEffect(function () {
    document.body.id = 'body';
  }, []);
  return /*#__PURE__*/React.createElement(ModalCpt, _extends({}, props, {
    headerDivider: headerDivider,
    footerDivider: footerDivider
  }));
};
PisellModal.confirm = confirm;
PisellModal.info = info;
PisellModal.error = error;
PisellModal.warn = warn;
PisellModal.warning = warning;
PisellModal.success = success;
PisellModal.Information = Information;
export default PisellModal;