text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var tslib_1 = require("tslib");
  var React = require("react");
  var Button_1 = require("office-ui-fabric-react/lib/Button");
  var Callout_1 = require("office-ui-fabric-react/lib/Callout");
  var CommandBar_1 = require("office-ui-fabric-react/lib/CommandBar");
  require("./CalloutExample.scss");
  var CalloutNestedExample = /** @class */ (function (_super) {
      tslib_1.__extends(CalloutNestedExample, _super);
      function CalloutNestedExample(props) {
          var _this = _super.call(this, props) || this;
          _this._onDismiss = _this._onDismiss.bind(_this);
          _this.state = {
              isCalloutVisible: false
          };
          return _this;
      }
      CalloutNestedExample.prototype.render = function () {
          var _this = this;
          var isCalloutVisible = this.state.isCalloutVisible;
          return (React.createElement("div", { className: "ms-CalloutExample" },
              React.createElement("div", { className: "ms-CalloutBasicExample-buttonArea", ref: function (menuButton) { return (_this._menuButtonElement = menuButton); } },
                  React.createElement(Button_1.DefaultButton, { onClick: this._onDismiss, text: isCalloutVisible ? 'Hide callout' : 'Show callout' })),
              isCalloutVisible ? (React.createElement("div", null,
                  React.createElement(Callout_1.Callout, { role: 'alertdialog', ariaLabelledBy: 'callout-label-2', className: "ms-CalloutExample-callout", gapSpace: 0, target: this._menuButtonElement, onDismiss: this._onDismiss, setInitialFocus: true },
                      React.createElement("div", { className: "ms-CalloutExample-header" },
                          React.createElement("p", { className: "ms-CalloutExample-title", id: 'callout-label-2' }, "Callout title here")),
                      React.createElement("div", { className: "ms-CalloutExample-inner" },
                          React.createElement("div", { className: "ms-CalloutExample-content" },
                              React.createElement("p", { className: "ms-CalloutExample-subText" }, "Message body is optional. If help documentation is available, consider adding a link to learn more at the bottom."))),
                      React.createElement(CommandBar_1.CommandBar, { items: this.props.items })))) : null));
      };
      CalloutNestedExample.prototype._onDismiss = function (ev) {
          this.setState({
              isCalloutVisible: !this.state.isCalloutVisible
          });
      };
      return CalloutNestedExample;
  }(React.Component));
  exports.CalloutNestedExample = CalloutNestedExample;
  //# sourceMappingURL=Callout.Nested.Example.js.map