import { upcloud_base_common } from "@/config/serviceSettings";
const remote = type => {
  return {
    remoteUrl: {
      url: upcloud_base_common+`/dict/listbytype/?dicttypeCodes=${type}`,
      method: 'post'
    },
    replaceFields: {
      label: 'dictName',
      value: 'dictId'
    },
    autoLoad: true
  }
}

const regions = id => {
  return {
    remoteUrl: {
      url: upcloud_base_common+`/list?fatherId=${id}`,
      method: 'get'
    },
    replaceFields: {
      label: 'regionsName',
      value: 'regionsId'
    },
    autoLoad: false
  }
}

export { remote, regions }
