"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canUseExportImageFlow = canUseExportImageFlow;
const itemType_1 = require("../../enums/itemType");
/**
 * @private
 * Determines if the export image flow can be used for the given entity.
 * @param entity entity to check if export image flow can be used
 * @returns whether the export image flow can be used
 */
function canUseExportImageFlow(entity) {
    const { type, typeKeywords = [] } = entity;
    // Tiled Imagery services cannot be downloaded. This typeKeyword check
    // is one way to distinguish between tiled and non-tiled imagery services.
    // TODO: Consider checking item.url instead so reference items are also excluded.
    return (type === itemType_1.ItemType["Image Service"] &&
        !typeKeywords.includes("Tiled Imagery"));
}
//# sourceMappingURL=canUseExportImageFlow.js.map