const remote = type => {
  return {
    remoteUrl: {
      url: `/api/upcloud-base-common/dict/listbytype/?dicttypeCodes=${type}`,
      method: 'post'
    },
    replaceFields: {
      label: 'dictName',
      value: 'dictCode'
    },
    autoLoad: true
  }
}

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

export { remote,regions }
