import React, { useState, useRef } from 'react'; import CheckMark from '../svg/CheckMark.jsx'; import useOnClickOutside from '~/hooks/useOnClickOutside.js'; import { Listbox, Transition } from '@headlessui/react'; import { Wrench, ArrowRight } from 'lucide-react'; import { cn } from '~/utils/'; function MultiSelectDropDown({ title = 'Plugins', value, disabled, setSelected, availableValues, showAbove = false, showLabel = true, containerClassName, isSelected, className, optionValueKey = 'value', }) { const [isOpen, setIsOpen] = useState(false); const menuRef = useRef(null); const excludeIds = ['select-plugin', 'plugins-label', 'selected-plugins']; useOnClickOutside(menuRef, () => setIsOpen(false), excludeIds); const handleSelect = (option) => { setSelected(option); setIsOpen(true); }; return (