import { Modal } from 'antd';
import { locales } from '@pisell/utils';
import classNames from 'classnames';
import "./index.less";
export var unsavedChangesConfirm = function unsavedChangesConfirm(callback, variant) {
  var isPhoneVariant = variant === 'phone';
  Modal.confirm({
    title: locales.getText('pisell2.saas.unsaved-changes'),
    content: locales.getText('pisell2.saas.unsaved-changes-content'),
    okText: locales.getText('pisell2.saas.leave'),
    cancelText: locales.getText('pisell2.saas.stay'),
    okButtonProps: {
      className: 'unsaved-changes-modal-ok-btn'
    },
    wrapClassName: classNames('unsaved-changes-modal', {
      'unsaved-changes-modal--phone': isPhoneVariant
    }),
    onOk: function onOk() {
      callback();
    }
  });
};