"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnknownFileGeneratorTest = void 0;
const ProjectInfoItem_1 = require("./ProjectInfoItem");
const IInfoItemData_1 = require("./IInfoItemData");
const StorageUtilities_1 = require("../storage/StorageUtilities");
var UnknownFileGeneratorTest;
(function (UnknownFileGeneratorTest) {
    UnknownFileGeneratorTest[UnknownFileGeneratorTest["unknownTypeFileFound"] = 102] = "unknownTypeFileFound";
})(UnknownFileGeneratorTest = exports.UnknownFileGeneratorTest || (exports.UnknownFileGeneratorTest = {}));
class UnknownFileGenerator {
    id = "UNKFILE";
    title = "Unknown files";
    canAlwaysProcess = true;
    getTopicData(topicId) {
        return {
            title: topicId.toString(),
        };
    }
    summarize(info, infoSet) { }
    async generate(project, file, contentIndex) {
        const items = [];
        if (!StorageUtilities_1.default.isUsableFile(file.storageRelativePath)) {
            const ext = StorageUtilities_1.default.getTypeFromName(file.name);
            items.push(new ProjectInfoItem_1.default(IInfoItemData_1.InfoItemType.error, this.id, UnknownFileGeneratorTest.unknownTypeFileFound, `Unknown type ${ext} file found`, project.getItemByExtendedOrProjectPath(file.extendedPath), file.extendedPath));
        }
        return items;
    }
}
exports.default = UnknownFileGenerator;

//# sourceMappingURL=../maps/info/UnknownFileGenerator.js.map
