import { Dropdown, Tooltip } from "@wordpress/components"; import { useRef, useState } from "@wordpress/element"; import "./editor.scss"; import { DropdownIcon } from "../../icons/icons"; const SPIconPicker = ({ attributes, attributesKey, setAttributes, label, closeBtn = true, iconType = "socialIcon", }) => { const socialIcon = [ "facebook", "x", "linkedin", "pinterest", "instagram", "vkontakte", "digg", "tumblr", "reddit", "whatsapp", "pocket", "xing", "mail", ]; const arrowIcon = [ "right-circled2", "left-circled2", "right-open", "right-open-mini", "right-open-big", "right-open-one", "left-open-one", "right-open-outline", "left-open", "left-open-mini", "left-open-big", "left-open-outline", "left-dir", "right-dir", "left-one", "right-one", "angles-right-solid", "arrow-right-solid", "forward-solid", "right-long-solid", "angle-up", ]; const icons = iconType === "socialIcon" ? socialIcon : arrowIcon; const activeIconRef = useRef(null); const [isDropdownOpen, setIsDropdownOpen] = useState(false); const handleChange = (newIcon) => { setAttributes({ [attributesKey]: newIcon }); }; const handleClose = () => { setAttributes({ [attributesKey]: "" }); }; return (