"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PanelHiddenOnDismissExample = void 0;
var React = require("react");
var Button_1 = require("@fluentui/react/lib-commonjs/Button");
var Panel_1 = require("@fluentui/react/lib-commonjs/Panel");
var TextField_1 = require("@fluentui/react/lib-commonjs/TextField");
var react_hooks_1 = require("@fluentui/react-hooks");
var contentExplanation = 'Try typing something in this text field, closing the panel, and re-opening the panel. ' +
    " The text field's contents should still be here when the panel re-opens.";
var PanelHiddenOnDismissExample = function () {
    var _a = react_hooks_1.useBoolean(false), isOpen = _a[0], _b = _a[1], openPanel = _b.setTrue, dismissPanel = _b.setFalse;
    return (React.createElement("div", null,
        "When dismissed, this panel will be hidden instead of destroyed. This is useful for cases in which the panel contains state which must be preserved across times that the panel is opened. ",
        React.createElement("br", null),
        React.createElement("br", null),
        React.createElement(Button_1.DefaultButton, { text: "Open panel", onClick: openPanel }),
        React.createElement(Panel_1.Panel, { isOpen: isOpen, closeButtonAriaLabel: "Close", isHiddenOnDismiss: true, headerText: "Panel - Hidden on dismiss", onDismiss: dismissPanel },
            React.createElement("div", null,
                contentExplanation,
                React.createElement("br", null),
                React.createElement("br", null),
                React.createElement(TextField_1.TextField, { ariaLabel: contentExplanation })))));
};
exports.PanelHiddenOnDismissExample = PanelHiddenOnDismissExample;
//# sourceMappingURL=Panel.HiddenOnDismiss.Example.js.map