"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLiveAppManifest = void 0;
const react_1 = require("react");
const index_1 = require("./LocalLiveAppProvider/index");
const index_2 = require("../platform/providers/RemoteLiveAppProvider/index");
const manifestDomainUtils_1 = require("./manifestDomainUtils");
function useLiveAppManifest(appId, customDappUrl) {
    const localManifest = (0, index_1.useLocalLiveAppManifest)(appId);
    const remoteManifest = (0, index_2.useRemoteLiveAppManifest)(appId);
    const manifest = (0, react_1.useMemo)(() => {
        const baseManifest = localManifest || remoteManifest;
        return (0, manifestDomainUtils_1.applyCustomDappUrl)(baseManifest, customDappUrl);
    }, [localManifest, remoteManifest, customDappUrl]);
    return manifest;
}
exports.useLiveAppManifest = useLiveAppManifest;
//# sourceMappingURL=useLiveAppManifest.js.map