"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canUseCreateReplica = canUseCreateReplica;
const hostedServiceUtils_1 = require("../content/hostedServiceUtils");
/**
 * Determines whether Hub can perform the /createReplica operation on a given service entity.
 * @param entity entity to check
 * @returns whether the /createReplica operation can be used
 */
function canUseCreateReplica(entity) {
    // NOTE: We currently do not allow Hub to perform the /createReplica operation on enterprise / self-hosted
    // feature services due to known limitations with the enterprise implementation of /createReplica.
    // This is a temporary restriction until the enterprise implementation is improved.
    // TODO: change to use `extendedProps.serverExtractCapability`
    return (0, hostedServiceUtils_1.isAGOFeatureServiceUrl)(entity.url) && !!entity.serverExtractCapability;
}
//# sourceMappingURL=canUseCreateReplica.js.map