"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.BaseService = void 0;
var _utils = require("@vtx/utils");
var _ahooks = require("ahooks");
var BaseService = {
  useBaseInfo: function useBaseInfo(id) {
    var _useRequest = (0, _ahooks.useRequest)(function () {
        return _utils.request.get('/cloud/jcss-reborn/facility/get', {
          data: {
            id: id,
            coordType: 'bd09'
          }
        });
      }, {
        refreshDeps: [id]
      }),
      baseInfoRes = _useRequest.data;
    var info = baseInfoRes === null || baseInfoRes === void 0 ? void 0 : baseInfoRes.data;
    var baseInfo = [{
      label: '设施类型',
      key: 'facilityClassName',
      value: info === null || info === void 0 ? void 0 : info.facilityClassName
    }, {
      label: '行政区划',
      key: 'divisionName',
      value: info === null || info === void 0 ? void 0 : info.divisionName
    }, {
      label: '管理单位',
      key: 'manageUnitName',
      value: info === null || info === void 0 ? void 0 : info.manageUnitName
    }, {
      label: '地址',
      key: 'address',
      value: info === null || info === void 0 ? void 0 : info.address
    }];
    var photos = (info === null || info === void 0 ? void 0 : info.photoIds) ? JSON.parse(info.photoIds) : [];
    return {
      baseInfo: baseInfo,
      photos: photos
    };
  }
};
exports.BaseService = BaseService;
//# sourceMappingURL=api.js.map
