"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewSizeContainer = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var common_1 = require("../api/common");
var view_size_1 = require("../components/view-size");
var hooks_1 = require("./hooks");
var hooks_mapguide_1 = require("./hooks-mapguide");
var ViewSizeContainer = function () {
    var width = (0, hooks_1.useActiveMapWidth)();
    var height = (0, hooks_1.useActiveMapHeight)();
    var sizeUnits = (0, hooks_1.useViewerSizeUnits)();
    var metersPerUnit = (0, hooks_mapguide_1.useActiveMapMetersPerUnit)();
    var view = (0, hooks_1.useActiveMapView)();
    var locale = (0, hooks_1.useViewerLocale)();
    if (width && height && metersPerUnit && view) {
        return React.createElement(view_size_1.ViewSize, { locale: locale, width: width, height: height, view: view, metersPerUnit: metersPerUnit, units: sizeUnits || common_1.UnitOfMeasure.Unknown });
    }
    else {
        return React.createElement("noscript", null);
    }
};
exports.ViewSizeContainer = ViewSizeContainer;
//# sourceMappingURL=view-size.js.map