import { defineStore } from 'pinia'
export default defineStore('updateCommunicateInfo', {
  state: () => ({
    linkTypeName: '',
    selectlinkType: '',
    dicNote2: '',
    dicNote3: '',
    sysDay: '',
    selectsysDay: [] as string[],
    sysTime: '',
    selectsysTime: [] as string[],
    cusName: '',
    selectcus: '',
    cusLevelName: '',
    selectcusLevel: '',
    linkTitle: '',
    cusUserNames: '',
    selectcusUserIds: [],
    staffNames: '',
    selectstaffIds: [],
    saleNames: '',
    selectsaleIds: [],
    linkFromName: '',
    linkFrom: 1,
    linkWayName: '',
    selectlinkWay: '',
    linkNote: '',
    meetingName: '',
    selectmeeting: '',
    staffNote: '',
    cusLinkStockList: <any>[],
    cusLinkStockListForLinkId: <any>[],
    saleScore: 0,
    saleNote: ''
  }),
  persist: {
    enabled: true,
    strategies: [
      {
        key: 'updateCommunicateInfo', // 持久化状态的键
        storage: localStorage // 使用localStorage来持久化状态
      }
    ]
  }
})
