import { request } from '@/http/axios'
import type { CabinetDetailResponse } from './type'

/** 获取智能柜详情接口 */
export function getCabinetDetailApi() {
  return request<CabinetDetailResponse>({
    url: 'cabinet/detail',
    method: 'get'
  })
}

export function openCabinet(lockControlNo: number, pinNo: number) {
  return request<ApiResponseData<void>>({
    url: `cabinet/openCabinet/${lockControlNo}/${pinNo}`,
    method: 'post'
  })
}