import React, { useState, useEffect } from 'react';
import { useAxiosGet } from '../../../utilities/useAxiosGet';
import { UdpMaintenanceEnginePage } from '../UdpMaintenanceEnginePage';
import { ConfigService } from '../../../configService';
const UdpInquiryMaintenanceEnginePage = (props) => {
    const { params } = props;
    const { nodeObj } = params;
    const [loading, setLoading] = useState(false);
    const [{ data: catalogKey, loading: catalogKeyLoading }] = useAxiosGet(ConfigService.productV1ApiUrl, `UdpObjectInfo/getCatalogId/${nodeObj.businessObjectKey}?fromUdpObjectInfo=true`, {}, !!!nodeObj, false);
    /*
      returns {
        entityName: Tenant,
        productId: 1,
        unityBaseGetAllMethod: {apiMethodId: 'f06f7853-5816-4950-a275-5085c3387d57', pathParameters: [{name: "version", in: "path", parameterType: "string", fullReference: ""}]},
        unityBaseGetMethod: {apiMethodId: '06f49cfd-0f1e-475a-812b-73cd3efd9f0d', pathParameters: [{name: "id", in: "path", parameterType: "string", fullReference: ""}, {name: "version", in: "path", parameterType: "string", fullReference: ""}]},
        unityBaseCreateMethod: {apiMethodId: '33310aad-8998-4661-800b-00649d280d31', pathParameters: [{name: "version", in: "path", parameterType: "string", fullReference: ""}]},
        unityBaseUpdateMethod: {apiMethodId: 'fe611db9-47ec-4a27-8840-871fe1323812', pathParameters: [{name: "id", in: "path", parameterType: "string", fullReference: ""}, {name: "version", in: "path", parameterType: "string", fullReference: ""}]},
        unityBaseDeleteMethod: {apiMethodId: 'dafb84b6-e424-43ff-9ef0-774a5795e420', pathParameters: [{name: "id", in: "path", parameterType: "string", fullReference: ""}, {name: "version", in: "path", parameterType: "string", fullReference: ""}]},
      }
    */
    // Set loading flag based on the API loading flags
    useEffect(() => {
        setLoading(catalogKeyLoading);
    }, [catalogKeyLoading]);
    return (React.createElement(UdpMaintenanceEnginePage, { catalogKey: catalogKey || '' }));
};
export default UdpInquiryMaintenanceEnginePage;
//# sourceMappingURL=UdpInquiryMaintenanceEnginePage.js.map