import {
  get,
  post,
} from '@/common/utils/http-util.ts'

export default {
  paging(data: DictItemTypes.SearchDictItemParam) {
    return get<G.PageResult<DictItemTypes.SearchDictItemResult>>('/dict_item/paging', data)
  },
  detail(id: string) {
    return get<DictItemTypes.SearchDictItemResult>('/dict_item/detail', {id})
  },
  add(data: DictItemTypes.AddDictItemParam) {
    return post('/dict_item/add', data)
  },
  modify(data: DictItemTypes.ModifyDictItemParam) {
    return post('/dict_item/modify', data)
  },
  del(ids: string[]) {
    return post('/dict_item/del', ids)
  },
}
