"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RIGHT_LETTERBOX_FRAMED_CONTAINER_ID = exports.LEFT_LETTERBOX_FRAMED_CONTAINER_ID = exports.UPPER_LETTERBOX_FRAMED_CONTAINER_ID = exports.LOWER_LETTERBOX_FRAMED_CONTAINER_ID = exports.TOOLBAR_FRAMED_CONTAINER_ID = exports.INSPECTOR_FRAMED_CONTAINER_ID = exports.RENDER_CANVAS_FRAMED_CONTAINER_ID = exports.SLIDE_INFO_FRAMED_CONTAINER_ID = void 0;
exports.setupStandardFramedScreen = setupStandardFramedScreen;
const UpdateTouchInputBound_1 = require("../../TouchController/UC/UpdateTouchInputBound");
const EmulateDisplaySizeHook_1 = require("../../zSpace/UC/EmulateDisplaySizeHook");
const Entities_1 = require("../Entities");
const PM_1 = require("../PM");
const UCs_1 = require("../UCs");
exports.SLIDE_INFO_FRAMED_CONTAINER_ID = "slideInfo";
exports.RENDER_CANVAS_FRAMED_CONTAINER_ID = "renderCanvas";
exports.INSPECTOR_FRAMED_CONTAINER_ID = "inspector";
exports.TOOLBAR_FRAMED_CONTAINER_ID = "toolbar";
exports.LOWER_LETTERBOX_FRAMED_CONTAINER_ID = "lowerLetterBox";
exports.UPPER_LETTERBOX_FRAMED_CONTAINER_ID = "upperLetterBox";
exports.LEFT_LETTERBOX_FRAMED_CONTAINER_ID = "leftLetterBox";
exports.RIGHT_LETTERBOX_FRAMED_CONTAINER_ID = "rightLetterBox";
function setupStandardFramedScreen(appObjects, options) {
    const frameScreenAO = appObjects.getOrCreate("FramedScreen");
    const framedScreen = (0, Entities_1.makeFramedScreen)(frameScreenAO);
    (0, PM_1.makeFramedScreenSizePM)(frameScreenAO);
    makeContainer(exports.SLIDE_INFO_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    const canvas = makeContainer(exports.RENDER_CANVAS_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.INSPECTOR_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.TOOLBAR_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.LOWER_LETTERBOX_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.UPPER_LETTERBOX_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.LEFT_LETTERBOX_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    makeContainer(exports.RIGHT_LETTERBOX_FRAMED_CONTAINER_ID, framedScreen, appObjects);
    new UpdateTouchInputBound_1.UpdateTouchInputBoundUC(canvas.appObject);
    (0, EmulateDisplaySizeHook_1.makeEmulateDisplaySizeHook)(canvas.appObject);
    if (options?.dontSetupLayoutHook !== true) {
        new UCs_1.StandardLayoutUC(frameScreenAO);
    }
    return frameScreenAO;
}
function makeContainer(id, screen, appObjects) {
    const ao = appObjects.getOrCreate(id);
    const entity = (0, Entities_1.makeFramedScreenContainer)(ao);
    (0, PM_1.makeFramedContainerPM)(ao);
    screen.addContainer(entity);
    return entity;
}
//# sourceMappingURL=setupStandardFramedScreen.js.map