"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PanelNavigationExample = 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 SearchBox_1 = require("@fluentui/react/lib-commonjs/SearchBox");
var react_hooks_1 = require("@fluentui/react-hooks");
var explanation = 'This panel has custom content in the navigation region (the part at the top which normally ' +
    'contains the close button). If the custom content replaces the close button, be sure to provide ' +
    'some other obvious way for users to close the panel.';
var searchboxStyles = { root: { margin: '5px', height: 'auto', width: '100%' } };
var PanelNavigationExample = function () {
    var _a = react_hooks_1.useBoolean(false), isOpen = _a[0], _b = _a[1], openPanel = _b.setTrue, dismissPanel = _b.setFalse;
    var onRenderNavigationContent = React.useCallback(function (props, defaultRender) { return (React.createElement(React.Fragment, null,
        React.createElement(SearchBox_1.SearchBox, { placeholder: "Search here...", styles: searchboxStyles, ariaLabel: "Sample search box. Does not actually search anything." }),
        // This custom navigation still renders the close button (defaultRender).
        // If you don't use defaultRender, be sure to provide some other way to close the panel.
        defaultRender(props))); }, []);
    return (React.createElement("div", null,
        explanation,
        React.createElement("br", null),
        React.createElement("br", null),
        React.createElement(Button_1.DefaultButton, { text: "Open panel", onClick: openPanel }),
        React.createElement(Panel_1.Panel, { headerText: "Panel with custom navigation content", onRenderNavigationContent: onRenderNavigationContent, isOpen: isOpen, onDismiss: dismissPanel, closeButtonAriaLabel: "Close" },
            React.createElement("div", null,
                React.createElement("p", null, explanation)))));
};
exports.PanelNavigationExample = PanelNavigationExample;
//# sourceMappingURL=Panel.Navigation.Example.js.map