import React, { useMemo } from "react";
import { Button, Dropdown } from "@pisell/materials";
//#region src/components/ecocup/components/MoreDropdown/index.tsx
const MoreDropdown = (props) => {
	const { locales, onClick, buttonText, showFields = ["missing", "broken"] } = props;
	const menuItems = useMemo(() => {
		return [{
			key: "missing",
			label: locales.getText("pisell2.text.ecocup.action.more.missing"),
			hidden: !showFields.includes("missing")
		}, {
			key: "broken",
			label: locales.getText("pisell2.text.ecocup.action.more.broken"),
			hidden: !showFields.includes("broken")
		}];
	}, [locales, showFields]);
	return /* @__PURE__ */ React.createElement(Dropdown, {
		trigger: ["click", "hover"],
		menu: {
			items: menuItems.filter((item) => !item.hidden),
			onClick: (item) => {
				console.log(item, item.key, "---Dropdown");
				onClick && onClick(item.key);
			}
		}
	}, /* @__PURE__ */ React.createElement(Button, null, buttonText || locales.getText("pisell2.text.ecocup.action.more")));
};
//#endregion
export { MoreDropdown as default };
