import React from 'react';
import LoginForm from "./LoginForm";
import { Modal } from 'antd';
import { useSnapshot } from 'valtio';
import { useIntl } from 'dumi';
import { authStore, hideLoginModal } from "../../model/auth";
export function LoginModal() {
  var authSnap = useSnapshot(authStore);
  var intl = useIntl();
  return /*#__PURE__*/React.createElement(Modal, {
    width: 400,
    title: intl.formatMessage({
      id: 'login.modal.title'
    }),
    open: authSnap.isModalOpen,
    onCancel: function onCancel() {
      return hideLoginModal();
    } // 直接调用 store 的 action
    ,
    footer: null,
    maskClosable: false,
    destroyOnHidden: true
  }, /*#__PURE__*/React.createElement(LoginForm, null));
}