"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CalloutGlobals = void 0;
exports.makeCalloutGlobals = makeCalloutGlobals;
const core_1 = require("@vived/core");
const OverlayColor_1 = require("../../OverlayColor/Entities/OverlayColor");
const CalloutRepo_1 = require("./CalloutRepo");
class CalloutGlobals extends core_1.AppObjectEntity {
}
exports.CalloutGlobals = CalloutGlobals;
CalloutGlobals.type = "CalloutGlobals";
CalloutGlobals.get = (appObjects) => {
    return (0, core_1.getSingletonComponent)(CalloutGlobals.type, appObjects);
};
function makeCalloutGlobals(appObject) {
    return new CalloutGlobalsImp(appObject);
}
class CalloutGlobalsImp extends CalloutGlobals {
    constructor(appObject) {
        super(appObject, CalloutGlobals.type);
        this.calloutRepoFactory = (id) => {
            const ao = this.appObjects.getOrCreate(id);
            return (0, CalloutRepo_1.makeCalloutRepoEntity)(ao);
        };
        this.lastSize = 1;
        this.lastColor = OverlayColor_1.OverlayColorEnums.WHITE;
        this.appObjects.registerSingleton(this);
    }
}
//# sourceMappingURL=CalloutGlobals.js.map