import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__ from "../../../icon/index.mjs";
const IconFilterList = (props)=>{
    const { currentKey, filterKey, onChange, changePop } = props;
    const iconKeysByFilter = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
        if (!filterKey) return __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.icons;
        const filterIcons = new Map();
        for (const key of __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.icons.keys())if (key.toLowerCase().includes(filterKey.toLowerCase())) filterIcons.set(key, __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.icons.get(key));
        return filterIcons;
    }, [
        filterKey
    ]);
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
        style: {
            width: '26em',
            maxHeight: '20em',
            overflowY: 'auto'
        },
        children: [
            ...iconKeysByFilter.keys()
        ].map((key)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("span", {
                style: {
                    fontSize: 18,
                    marginRight: 10,
                    cursor: 'pointer',
                    backgroundColor: currentKey == key ? '#9bb0d393' : ''
                },
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tooltip, {
                    destroyTooltipOnHide: true,
                    mouseEnterDelay: 0.3,
                    mouseLeaveDelay: 0.3,
                    placement: "top",
                    title: key,
                    arrow: {
                        pointAtCenter: true
                    },
                    children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.Icon, {
                        type: key,
                        onClick: ()=>{
                            onChange(key);
                            changePop(false);
                        }
                    })
                })
            }, key))
    });
};
export { IconFilterList };
