"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupCallouts = setupCallouts;
const Transform3D_1 = require("../../Transform3D");
const calloutRepoFactory_1 = require("./calloutRepoFactory");
const Controller_1 = require("../Controller");
const Entities_1 = require("../Entities");
const UC_1 = require("../UC");
const Tools_1 = require("../../Tools");
function setupCallouts(appObjects) {
    const calloutsAO = appObjects.getOrCreate("Callouts");
    const globals = (0, Entities_1.makeCalloutGlobals)(calloutsAO);
    globals.calloutRepoFactory = (0, calloutRepoFactory_1.makeCalloutRepoFactory)(appObjects);
    // UCs
    (0, UC_1.makeTryPanLabelUC)(calloutsAO);
    (0, UC_1.makeTryAddCalloutUC)(calloutsAO);
    new UC_1.SerializeCallouts(calloutsAO);
    (0, UC_1.makeDeleteAllCalloutsUC)(calloutsAO);
    // Controllers
    new Controller_1.MouseAddCalloutMC(calloutsAO);
    new Controller_1.TouchAddCalloutTC(calloutsAO);
    new Transform3D_1.MousePanTransformMC(calloutsAO);
    new Transform3D_1.TouchPanTransformTC(calloutsAO);
    // Setup Tool
    const toolRepo = Tools_1.ToolRepository.get(appObjects);
    if (!toolRepo) {
        appObjects.submitWarning("setupCallouts", "Unable to find tool repo");
        return calloutsAO;
    }
    toolRepo.makeToolFromData({
        toolType: "CALLOUT",
        isDefault: false,
        label: "Callout",
        shortcutLabel: "c",
        hotkeys: [{ keyCode: "KeyC" }],
    });
    return calloutsAO;
}
//# sourceMappingURL=setupCallouts.js.map