"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ComboBoxTogglesExample = void 0;
var React = require("react");
var react_1 = require("@fluentui/react");
var react_hooks_1 = require("@fluentui/react-hooks");
var options = [
    { key: 'Header1', text: 'First heading', itemType: react_1.SelectableOptionMenuItemType.Header },
    { key: 'A', text: 'Option A' },
    { key: 'B', text: 'Option B' },
    { key: 'C', text: 'Option C' },
    { key: 'D', text: 'Option D' },
    { key: 'divider', text: '-', itemType: react_1.SelectableOptionMenuItemType.Divider },
    { key: 'Header2', text: 'Second heading', itemType: react_1.SelectableOptionMenuItemType.Header },
    { key: 'E', text: 'Option E' },
    { key: 'F', text: 'Option F', disabled: true },
    { key: 'G', text: 'Option G' },
    { key: 'H', text: 'Option H' },
    { key: 'I', text: 'Option I' },
    { key: 'J', text: 'Option J' },
];
// Optional styling to make the example look nicer
var comboBoxStyles = { root: { maxWidth: 300 } };
var stackTokens = { childrenGap: 20 };
var ComboBoxTogglesExample = function () {
    var _a = react_hooks_1.useBoolean(false), autoComplete = _a[0], toggleAutoComplete = _a[1].toggle;
    var _b = react_hooks_1.useBoolean(true), allowFreeform = _b[0], toggleAllowFreeform = _b[1].toggle;
    return (React.createElement(react_1.Stack, { horizontal: true, tokens: stackTokens },
        React.createElement(react_1.ComboBox, { label: "ComboBox with toggleable freeform/auto-complete", allowFreeform: allowFreeform, autoComplete: autoComplete ? 'on' : 'off', options: options, styles: comboBoxStyles, 
            // Force re-creating the component when the toggles change (for demo purposes)
            key: '' + autoComplete + allowFreeform }),
        React.createElement(react_1.Toggle, { label: "Allow freeform", checked: allowFreeform, onChange: toggleAllowFreeform }),
        React.createElement(react_1.Toggle, { label: "Auto-complete", checked: autoComplete, onChange: toggleAutoComplete })));
};
exports.ComboBoxTogglesExample = ComboBoxTogglesExample;
//# sourceMappingURL=ComboBox.Toggles.Example.js.map