import { jsx as _jsx } from "react/jsx-runtime";
import cx from 'classnames';
import './VariableSuggestionInputDropDown.scss';
import Typography from '../Typography';
import { checkEmpty } from '../../utils/checkEmpty/checkEmpty';
import { truncateText } from '../../utils/truncateText/truncateText';
const OptionsDropdown = ({ onSelectVariable, dropdownPosition, filteredOptions = [], position = 'relative', width = '100%', zIndex, truncateTextValue = 34, }) => {
    return (_jsx("div", { className: cx(`ff-variable-dropdown-container ${position}`), style: dropdownPosition
            ? {
                top: dropdownPosition.top + 30,
                left: dropdownPosition.left - 30,
                width,
                zIndex,
            }
            : { width, zIndex }, children: !checkEmpty(filteredOptions) ? (filteredOptions?.map((option) => {
            return (_jsx("div", { className: "ff-variable-option", onMouseDown: () => onSelectVariable(option), children: _jsx(Typography, { as: "span", fontSize: 14, children: truncateText(option?.name, truncateTextValue) }) }, option?.id));
        })) : (_jsx("div", { className: "ff-variable-option", children: _jsx(Typography, { as: "div", children: "No Option", fontSize: 14 }) })) }));
};
export default OptionsDropdown;
//# sourceMappingURL=OptionsDropdown.js.map