// Base
import * as base from './_crud-base'

const path = '/api/v1/member'
const name = 'member'

export function getList(params: any = null) {
  let url = path
  if (params?.number && params.mode === 'by-identity') {
    url += `/nik/${params.number}/${params.date}`
  }
  if (params?.number && params.mode === 'by-card') {
    url += `/bpjs/${params.number}/${params.date}`
  }
  if (params) {
    delete params.number
    delete params.mode
    delete params.date
  }
  return base.getList(url, params, name)
}
