import request from "@/utils/request";

export function index (params,isLoading=true) {
  return request({
    method: "get",
    url: "/api/admin/person/index",
    params,
    isLoading
  })
}

export function store (data,isLoading=true) {
  return request({
    method: "post",
    url: "/api/admin/person/store",
    data,
    isLoading
  })
}

export function show (params,isLoading=true) {
  return request({
    method: "get",
    url: "/api/admin/person/show",
    params,
    isLoading
  })
}

export function save (data,isLoading=true) {
  return request({
    method: "post",
    url: "/api/admin/person/save",
    data,
    isLoading
  })
}

export function destroy (data,isLoading=true) {
  return request({
    method: "post",
    url: "/api/admin/person/delete",
    data,
    isLoading
  })
}

export function assignCategoryType (data,isLoading=true) {
  return request({
    method: "post",
    url: "/api/admin/person/assign-category-type",
    data,
    isLoading
  })
}
