'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var core = require('@mantine/core');
var index$3 = require('./index-98ac1127.js');
var index$1 = require('./index-c3d01be3.js');
var index = require('./index-3643ff1b.js');
var index$2 = require('./index-b0ce6f8f.js');
var styled = require('@emotion/styled');
var utils = require('./utils-b92a8b1c.js');
var miscTheme = require('./miscTheme.js');
require('./tslib.es6-2c2ed574.js');
require('./index-3d563586.js');
require('./shared-60ad3e5a.js');
require('./index-59a9827e.js');
require('./translationsContext-78113889.js');
require('./constantsDomainLocales.js');
require('./Locale-fbe01177.js');
require('./constantsIsProduction.js');

function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefault(React);
var styled__default = /*#__PURE__*/_interopDefault(styled);

const StyledPopup = styled__default["default"].div `
  background-color: white;
  text-align: center;
  .cancle-img {
    margin-top: 24px;
    ${utils.MediaQueries.mbDown} {
      width: 80px;
      height: 80px;
    }

    ${utils.MediaQueries.mbUp} {
      width: 100px;
      height: 100px;
    }
  }

  h2 {
    margin-top: 32px;
    color: ${miscTheme.theme.colors.gray800};
    font-style: normal;
    font-weight: bold;
    ${utils.MediaQueries.mbDown} {
      font-size: 24px;
      line-height: 32px;
    }

    ${utils.MediaQueries.mbUp} {
      font-size: 32px;
      line-height: 42px;
    }
  }

  p {
    margin-top: 8px;
    color: ${miscTheme.theme.colors.gray600};
    font-style: normal;
    font-weight: normal;
    ${utils.MediaQueries.mbDown} {
      font-size: 16px;
      line-height: 24px;
    }

    ${utils.MediaQueries.mbUp} {
      font-size: 16px;
      line-height: 24px;
    }
  }
`;
const StyledButtonGroup = styled__default["default"].div `
  display: flex;

  ${utils.MediaQueries.mbDown} {
    margin-top: 24px;
  }

  ${utils.MediaQueries.mbUp} {
    margin-top: 32px;
  }
  justify-content: space-around;
  button {
    flex: 1;
    margin: 4px;
  }

  ${(props) => props.siteType === 'marryBaby'
    ? `
        .cancel-button {
            background-color: #E55C8A;
        }
        .cancel-button:hover {
          background-color: #E55C8A !important;
        }
        .logout-button {
            border-color: #E55C8A;
            color: #E55C8A;
        }
      `
    : ''}
`;

const NavigationLogoutPopup = ({ openLogoutPopup, onCloseHandler, onLogoutHandler, siteType = 'helloSites', }) => {
    const { t } = index.useTranslations();
    React.useEffect(() => {
        document.body.classList.toggle('noscroll', openLogoutPopup);
    }, [openLogoutPopup]);
    return (React__default["default"].createElement(core.Portal, null,
        React__default["default"].createElement(index$1.Popup, { type: "confirm", isOpen: openLogoutPopup, closeIcon: React__default["default"].createElement("img", { src: index$2.CommonGAssets.getAssetPath('closeLight.svg'), style: { width: 24, height: 24 }, alt: "close-icon", loading: "lazy" }), onClose: onCloseHandler },
            React__default["default"].createElement(StyledPopup, null,
                siteType === 'helloSites' && (React__default["default"].createElement("img", { src: index$2.CommonGAssets.getAssetPath('arrowDoor.svg'), className: "cancle-img", alt: "close-account", loading: "lazy" })),
                React__default["default"].createElement("h2", null, t(siteType === 'helloSites'
                    ? 'logout.popup.ask1'
                    : 'logout.popup.ask.mb')),
                React__default["default"].createElement("p", null, t('logout.popup.ask2')),
                React__default["default"].createElement(StyledButtonGroup, { siteType: siteType },
                    React__default["default"].createElement(index$3.Button, { className: "logout-button", color: "tertiary", size: "lg", onClick: onLogoutHandler }, t('logout.popup.button.logout')),
                    React__default["default"].createElement(index$3.Button, { className: "cancel-button", color: "primary", size: "lg", onClick: onCloseHandler }, t('logout.popup.button.cancel')))))));
};

exports.NavigationLogoutPopup = NavigationLogoutPopup;
