import { request } from '@vtx/utils';
import { useRequest } from 'ahooks';
var overviewApis = {
  useInfo: function useInfo(id) {
    var _useRequest = useRequest(function () {
        return request.get('/cloud/jzlj/web/ys/unit/info/get', {
          data: {
            id: id
          }
        });
      }, {
        ready: !!id,
        refreshDeps: [id]
      }),
      data = _useRequest.data;
    return {
      info: (data === null || data === void 0 ? void 0 : data.data) || {}
    };
  },
  useCarInfo: function useCarInfo(id) {
    var _useRequest2 = useRequest(function () {
        return request.get('/cloud/jzlj/web/api/car/info/list', {
          data: {
            belongUnitIds: id
          }
        });
      }, {
        ready: !!id,
        refreshDeps: [id]
      }),
      data = _useRequest2.data;
    return {
      carInfoData: (data === null || data === void 0 ? void 0 : data.data) || []
    };
  }
};
export { overviewApis };