import customerService from '@/api/customer'
const GetLabelObject = (): any => {
  return {
    IsCustom: 2,
    name: '标签',
    value: 'diy_标签',
    visible: false,
    data: {
      Id: 0,
      Type: 4,
      Name: '标签',
      IsDefault: 0,
      IsLock: 0,
      IsSystem: 0,
      OptionsList: [],
      TypeName: '标签'
    }
  }
}

const GetChannelObject = async (): Promise<any> => {
  let list: Array<any> = new Array<any>()
  await customerService.getCustomStageList({}).then(r => {
    if (r.data && r.data.Data) {
      list = r.data.Data
    }
  })
  return {
    IsCustom: 3,
    name: '客户阶段',
    value: 'diy_客户阶段',
    visible: false,
    data: {
      Id: 0,
      Type: 3,
      Name: '客户阶段',
      IsDefault: 0,
      IsLock: 0,
      IsSystem: 0,
      OptionsList: list,
      TypeName: '客户阶段'
    }
  }
}

export { GetLabelObject, GetChannelObject }
