import request from '@/utils/request'

export function index(params){
  return request({
    method:'get',
    url:'/api/admin/package/index',
    params
  })
}

export function getItems(params){
  return request({
    method:'get',
    url:'/api/admin/package/get-items',
    params
  })
}

export function getProductTypes(params){
  return request({
    method:'get',
    url:'/api/admin/package/get-product-types',
    params
  })
}

export function store(data){
  return request({
    method:'post',
    url:'/api/admin/package/store',
    data
  })
}

export function save(data){
  return request({
    method:'post',
    url:'/api/admin/package/update',
    data
  })
}

export function destroy(data){
  return request({
    method:'post',
    url:'/api/admin/package/delete',
    data
  })
}

export function toggleActive(data){
  return request({
    method:'post',
    url:'/api/admin/package/toggle-active',
    data
  })
}

export function saveItems(data){
  return request({
    method:'post',
    url:'/api/admin/package/save-items',
    data
  })
}

export function deleteItems(data){
  return request({
    method:'post',
    url:'/api/admin/package/delete-items',
    data
  })
}
