"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module StatusBar
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.StatusBarZone = void 0;
const React = require("react");
const appui_layout_react_1 = require("@itwin/appui-layout-react");
const SafeAreaContext_1 = require("../safearea/SafeAreaContext");
const StatusBar_1 = require("../statusbar/StatusBar");
const FrameworkZone_1 = require("./FrameworkZone");
const Outline_1 = require("./Outline");
const ZoneTargets_1 = require("../dragdrop/ZoneTargets");
/** Status Bar Zone React component.
 * @internal
 */
class StatusBarZone extends React.PureComponent {
    render() {
        const bounds = (0, FrameworkZone_1.getFloatingZoneBounds)(this.props.zoneProps);
        return (React.createElement(SafeAreaContext_1.SafeAreaContext.Consumer, null, (safeAreaInsets) => (React.createElement(React.Fragment, null,
            React.createElement(appui_layout_react_1.Zone, { bounds: this.props.isInFooterMode ? undefined : bounds, className: this.props.className, id: this.props.zoneProps.id, isHidden: this.props.isHidden, isInFooterMode: this.props.isInFooterMode, safeAreaInsets: safeAreaInsets }, this.props.widgetControl &&
                React.createElement(StatusBar_1.StatusBar, { isInFooterMode: this.props.isInFooterMode, widgetControl: this.props.widgetControl })),
            React.createElement(appui_layout_react_1.Zone, { bounds: this.props.zoneProps.bounds, id: this.props.zoneProps.id, isInFooterMode: this.props.isInFooterMode, safeAreaInsets: safeAreaInsets },
                React.createElement(ZoneTargets_1.ZoneTargets, { zoneId: this.props.zoneProps.id, dropTarget: this.props.dropTarget, targetChangeHandler: this.props.targetChangeHandler })),
            React.createElement(Outline_1.Outline, { bounds: this.props.targetedBounds })))));
    }
}
exports.StatusBarZone = StatusBarZone;
//# sourceMappingURL=StatusBarZone.js.map