import { defineStore } from 'pinia'
import type Message from '@/mode/Message'

export interface IState {
  showMultipleCheck:boolean
  checkList: Array<Message>
  message: Message
}
export const useMessageStore = defineStore({
  id: 'message_store',
  state: (): IState => ({
    showMultipleCheck:false,
    checkList: [],
    message: {} as Message
  }),
  actions: {
    setShowMultipleCheck(show: boolean) {
        this.showMultipleCheck = show
    },
    setCheckList(list: Array<Message>) {
      this.checkList = list
    },
    setMessage(message: Message) {
      this.message = message
    }
  }
})
