"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var Button_1 = require("office-ui-fabric-react/lib/Button");
var Panel_1 = require("office-ui-fabric-react/lib/Panel");
var react_hooks_1 = require("@uifabric/react-hooks");
var buttonStyles = { root: { marginRight: 8 } };
exports.PanelFooterExample = function () {
    var _a = React.useState(false), isOpen = _a[0], setIsOpen = _a[1];
    var openPanel = react_hooks_1.useConstCallback(function () { return setIsOpen(true); });
    var dismissPanel = react_hooks_1.useConstCallback(function () { return setIsOpen(false); });
    // This panel doesn't actually save anything; the buttons are just an example of what
    // someone might want to render in a panel footer.
    var onRenderFooterContent = react_hooks_1.useConstCallback(function () { return (React.createElement("div", null,
        React.createElement(Button_1.PrimaryButton, { onClick: dismissPanel, styles: buttonStyles }, "Save"),
        React.createElement(Button_1.DefaultButton, { onClick: dismissPanel }, "Cancel"))); });
    return (React.createElement("div", null,
        React.createElement(Button_1.DefaultButton, { text: "Open panel", onClick: openPanel }),
        React.createElement(Panel_1.Panel, { isOpen: isOpen, onDismiss: dismissPanel, headerText: "Panel with footer at bottom", closeButtonAriaLabel: "Close", onRenderFooterContent: onRenderFooterContent, 
            // Stretch panel content to fill the available height so the footer is positioned
            // at the bottom of the page
            isFooterAtBottom: true },
            React.createElement("span", null, "Content goes here."))));
};
//# sourceMappingURL=Panel.Footer.Example.js.map