"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LandmarkGlobals = void 0;
exports.makeLandmarkGlobals = makeLandmarkGlobals;
const core_1 = require("@vived/core");
const OverlayColor_1 = require("../../OverlayColor");
const LandmarkRepo_1 = require("./LandmarkRepo");
class LandmarkGlobals extends core_1.AppObjectEntity {
}
exports.LandmarkGlobals = LandmarkGlobals;
LandmarkGlobals.type = "LandmarkGlobals";
LandmarkGlobals.get = (appObjects) => (0, core_1.getSingletonComponent)(LandmarkGlobals.type, appObjects);
function makeLandmarkGlobals(appObject) {
    return new LandmarkConstantsImp(appObject);
}
class LandmarkConstantsImp extends LandmarkGlobals {
    constructor(appObject) {
        super(appObject, LandmarkGlobals.type);
        this.landmarkRepoFactory = (id) => {
            const ao = this.appObjects.getOrCreate(id);
            return (0, LandmarkRepo_1.makeLandmarkRepoEntity)(ao);
        };
        this.lastSize = 1;
        this.lastColor = OverlayColor_1.OverlayColorEnums.BLUE;
        this.appObjects.registerSingleton(this);
    }
}
//# sourceMappingURL=LandmarkGlobals.js.map