import { MousePanTransformMC, TouchPanTransformTC } from "../../Transform3D";
import { makeCalloutRepoFactory } from "./calloutRepoFactory";
import { MouseAddCalloutMC, TouchAddCalloutTC } from "../Controller";
import { makeCalloutGlobals } from "../Entities";
import { makeDeleteAllCalloutsUC, makeTryAddCalloutUC, makeTryPanLabelUC, SerializeCallouts, } from "../UC";
import { ToolRepository } from "../../Tools";
export function setupCallouts(appObjects) {
    const calloutsAO = appObjects.getOrCreate("Callouts");
    const globals = makeCalloutGlobals(calloutsAO);
    globals.calloutRepoFactory = makeCalloutRepoFactory(appObjects);
    // UCs
    makeTryPanLabelUC(calloutsAO);
    makeTryAddCalloutUC(calloutsAO);
    new SerializeCallouts(calloutsAO);
    makeDeleteAllCalloutsUC(calloutsAO);
    // Controllers
    new MouseAddCalloutMC(calloutsAO);
    new TouchAddCalloutTC(calloutsAO);
    new MousePanTransformMC(calloutsAO);
    new TouchPanTransformTC(calloutsAO);
    // Setup Tool
    const toolRepo = 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