import { defineStore } from 'pinia';
import { TimeoutWarning, TimeOutAlarmList } from '@/api/earlywarning/index'
export const useEarlyWarningStore = defineStore({
  id: 'earlyWarning',
  state: () => ({
    overdueWarning: 0,
    ExpirationWarning: 0,
  }),
  actions:{
    async getWarning(){
      TimeoutWarning({}).then(res => {
        this.ExpirationWarning = res.total
      })
      TimeOutAlarmList({}).then(res => {
        this.overdueWarning = res.total
      })
    }
  }
})