"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MouseLabelDropAuthor = void 0;
exports.makeMouseLabelDropAuthor = makeMouseLabelDropAuthor;
const core_1 = require("@vived/core");
const MouseInput_1 = require("../../MouseInput/Entities/MouseInput");
const ToggleLabelDropTargetUC_1 = require("../UseCases/ToggleLabelDropTargetUC");
class MouseLabelDropAuthor extends core_1.AppObjectController {
}
exports.MouseLabelDropAuthor = MouseLabelDropAuthor;
MouseLabelDropAuthor.type = "MouseLabelDropAuthor";
function makeMouseLabelDropAuthor(appObject) {
    return new MouseLabelDropAuthorImp(appObject);
}
class MouseLabelDropAuthorImp extends MouseLabelDropAuthor {
    get mouseInput() {
        return this.getCachedSingleton(MouseInput_1.MouseInputEntity.type);
    }
    get addLabelDropCorrectObjectFromRayUC() {
        return this.getCachedSingleton(ToggleLabelDropTargetUC_1.ToggleLabelDropTargetUC.type);
    }
    constructor(appObject) {
        super(appObject, MouseLabelDropAuthor.type);
        this.onClick = (e) => {
            this.addLabelDropCorrectObjectFromRayUC?.tryToggleFromPixel(e.position);
        };
        this.mouseInput?.registerController(this);
    }
}
//# sourceMappingURL=MouseLabelDropAuthor.js.map