"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BaseService = void 0;
var _utils = require("@vtx/utils");
var _ahooks = require("ahooks");
var BaseService = exports.BaseService = {
  useBaseInfo: function useBaseInfo(id) {
    var _useRequest = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/jzlj/web/ys/unit/info/get', {
          data: {
            id: id
          }
        });
      }, {
        refreshDeps: [id]
      }),
      baseInfoRes = _useRequest.data;
    return {
      baseInfoData: (baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data) || {}
    };
  },
  useCarInfo: function useCarInfo(id) {
    var _useRequest2 = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/jzlj/web/api/car/info/list', {
          data: {
            belongUnitIds: id
          }
        });
      }, {
        refreshDeps: [id]
      }),
      carInfoRes = _useRequest2.data;
    return {
      carInfoData: (carInfoRes === null || carInfoRes === void 0 ? void 0 : carInfoRes.data) || []
    };
  }
};
//# sourceMappingURL=api.js.map
