import { jsx as _jsx } from "react/jsx-runtime";
/*!
 * Copyright (c) Microsoft. All rights reserved.
 * Licensed under the MIT license. See LICENSE file in the project.
 */ import { Dropdown } from '@fluentui/react';
import { memo } from 'react';
import { dropdownStyles } from '../styles.js';
import { useDropdownOptions, useOptionRenderer } from './MultiDropdown.hooks.js';
/**
 * Dropdown wrapper to manage multi-select with a select all/none helper.
 */ export const MultiDropdown = /*#__PURE__*/ memo(function MultiDropdown({ options , selectedKeys , onSelectAllOrNone , ...props }) {
    const opts = useDropdownOptions(options, selectedKeys);
    const handleRenderOption = useOptionRenderer(options, onSelectAllOrNone);
    return /*#__PURE__*/ _jsx(Dropdown, {
        required: true,
        multiSelect: true,
        options: opts,
        selectedKeys: selectedKeys,
        styles: dropdownStyles,
        onRenderOption: handleRenderOption,
        ...props
    });
});
