/*
 * @Author: your name
 * @Date: 2021-09-06 17:38:49
 * @LastEditTime: 2021-09-23 09:06:27
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /MedicalWisdomCheckSys/src/models/allModels.ts
 */
import { useState, useCallback } from 'react'
import accreditationDetail from '@/pages/GradeHospitalAccreditation/accreditationDetail/model';
import articleManagement from '@/pages/GradeHospitalAccreditation/articleManagement/model';
import ledgerUpload from '@/pages/GradeHospitalAccreditation/ledgerUpload/model';
import publicData from '@/pages/DataManagement/publicData/model';

export default function allModel() {
  const [user, setUser] = useState<string>()

  const signin = useCallback((account, password) => {
    // signin implementation
    // setUser(user from signin API)
  },[])

  const signout = useCallback(() => {
    // signout implementation
    // setUser(null)
  }, [])

  return {
    user,
    setUser,
    signin,
    signout,
    accreditationDetail:{...accreditationDetail()}, // 评审细则
    articleManagement:{...articleManagement()},// 条文管理
    ledgerUpload:{...ledgerUpload()}, // 台账上传
    publicData:{...publicData()},// 公共资料
  }
}