const useSocketStore = defineStore('socket', {
  state: () => ({
    accountNumber: '',
    extensionNumber: '',
    groupNumber: '',
    lineState: '',
    incomingData: {}
  }),
  actions: {
    // 设置工号
    setAccountNumber(value) {
      this.accountNumber = value
    },
    // 设置分机号
    setExtensionNumber(value) {
      this.extensionNumber = value
    },
    setGroupNumber(value){
      this.groupNumber = value
    },
    // 保存线路状态
    setLineState(value) {
      this.lineState = value
    },
    // 保存来电信息
    setIncomingData(data) {
      console.log('setIncomingData', data)
      this.incomingData = data
    }
  }
})

export default useSocketStore
