<script setup lang="ts">
import BusinessAccountMessage from '~/pages/account/messages.vue'

const { isMessageModalOpen, closeMessageModal, isNeedContact, option } = useMessageModal()

// async function handleLogin() {
//   error.value = false
//   isLoading.value = true
//   try {
//     await login(loginForm.value)
//     closeLoginModal({ status: true })
//   }
//   catch (err) {
//     error.value = true
//   }
//   finally {
//     isLoading.value = false
//   }
// }

function handleClose() {
  closeMessageModal({ status: false, error: '用户取消登录' })
}
</script>

<template>
  <el-dialog
    v-model="isMessageModalOpen"
    :append-to-body="true"
    width="800"
    @close="handleClose"
  >
    <BusinessAccountMessage v-if="!isNeedContact && isMessageModalOpen" :option :is-use-contact="false" />
    <BusinessAccountMessage v-else-if="isMessageModalOpen" refer="global" />
  </el-dialog>
</template>

<style lang="less">

</style>
