text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var tslib_1 = require("tslib");
  var React = require("react");
  /* tslint:disable:no-string-literal */
  var Button_1 = require("office-ui-fabric-react/lib/Button");
  var Dialog_1 = require("office-ui-fabric-react/lib/Dialog");
  var Button_2 = require("office-ui-fabric-react/lib/Button");
  var Panel_1 = require("office-ui-fabric-react/lib/Panel");
  var FocusTrapDialogInPanelExample = /** @class */ (function (_super) {
      tslib_1.__extends(FocusTrapDialogInPanelExample, _super);
      function FocusTrapDialogInPanelExample(props) {
          var _this = _super.call(this, props) || this;
          _this._showDialog = function () {
              _this.setState({ hideDialog: false });
          };
          _this._closeDialog = function () {
              _this.setState({ hideDialog: true });
          };
          _this._onClosePanel = function () {
              _this.setState({ showPanel: false });
          };
          _this._onShowPanel = function () {
              _this.setState({ showPanel: true });
          };
          _this.state = {
              hideDialog: true,
              showPanel: false
          };
          return _this;
      }
      FocusTrapDialogInPanelExample.prototype.render = function () {
          return (React.createElement("div", null,
              React.createElement(Button_1.DefaultButton, { secondaryText: "Opens the Sample Panel", onClick: this._onShowPanel, text: "Open Panel" }),
              React.createElement(Panel_1.Panel, { isOpen: this.state.showPanel, type: Panel_1.PanelType.smallFixedFar, onDismiss: this._onClosePanel, headerText: "This panel makes use of FocusTrapZone. Focus should be trapped in the panel.", closeButtonAriaLabel: "Close" },
                  React.createElement(Button_1.DefaultButton, { secondaryText: "Opens the Sample Dialog", onClick: this._showDialog, text: "Open Dialog" }),
                  React.createElement(Dialog_1.Dialog, { hidden: this.state.hideDialog, onDismiss: this._closeDialog, isBlocking: true, dialogContentProps: {
                          type: Dialog_1.DialogType.normal,
                          title: 'This dialog also makes use of FocusTrapZone. Focus should be trapped in the dialog.',
                          subText: "Focus will move back to the panel if you press 'OK' or 'Cancel'."
                      }, modalProps: {
                          titleAriaId: 'myLabelId',
                          subtitleAriaId: 'mySubTextId',
                          isBlocking: false,
                          containerClassName: 'ms-dialogMainOverride'
                      } },
                      null /** You can also include null values as the result of conditionals */,
                      React.createElement(Dialog_1.DialogFooter, null,
                          React.createElement(Button_2.PrimaryButton, { onClick: this._closeDialog, text: "OK" }),
                          React.createElement(Button_1.DefaultButton, { onClick: this._closeDialog, text: "Cancel" }))))));
      };
      return FocusTrapDialogInPanelExample;
  }(React.Component));
  exports.default = FocusTrapDialogInPanelExample;
  //# sourceMappingURL=FocusTrapZone.DialogInPanel.Example.js.map