import { __extends } from "tslib";
import * as React from 'react';
import { DefaultButton, PositioningContainer } from 'office-ui-fabric-react';
var PositioningContainerBasicExample = /** @class */ (function (_super) {
    __extends(PositioningContainerBasicExample, _super);
    function PositioningContainerBasicExample(props) {
        var _this = _super.call(this, props) || this;
        _this._onShowMenuClicked = _this._onShowMenuClicked.bind(_this);
        _this._onDismiss = _this._onDismiss.bind(_this);
        _this.state = {
            isPositioningContainerVisible: false
        };
        return _this;
    }
    PositioningContainerBasicExample.prototype.render = function () {
        var isPositioningContainerVisible = this.state.isPositioningContainerVisible;
        return (React.createElement("div", null,
            React.createElement("div", { className: "ms-PositioningContainerBasicExample-buttonArea" },
                React.createElement(DefaultButton, { onClick: this._onShowMenuClicked, text: isPositioningContainerVisible ? 'Hide Positioning Container' : 'Show Positioning Container', className: 'ms-PositioningContainer-basicExampleButton' })),
            isPositioningContainerVisible && (React.createElement(PositioningContainer, { className: "ms-PositioningContainer", role: 'alertdialog', target: '.ms-PositioningContainer-basicExampleButton', onDismiss: this._onDismiss, setInitialFocus: true },
                React.createElement("h1", null, "An H1 element")))));
    };
    PositioningContainerBasicExample.prototype._onShowMenuClicked = function () {
        this.setState({
            isPositioningContainerVisible: !this.state.isPositioningContainerVisible
        });
    };
    PositioningContainerBasicExample.prototype._onDismiss = function () {
        this.setState({
            isPositioningContainerVisible: false
        });
    };
    return PositioningContainerBasicExample;
}(React.Component));
export { PositioningContainerBasicExample };
//# sourceMappingURL=PositioningContainer.Basic.Example.js.map