import { Modal } from 'antd';
import { locales } from '@pisell/utils';
import "./index.less";
export var unsavedChangesConfirm = function unsavedChangesConfirm(callback) {
  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: 'unsaved-changes-modal',
    onOk: function onOk() {
      callback();
    }
  });
};