import PopoverContent from "./PopoverContent.js";
import ButtonIcon from "../ButtonIcon/index.js";
import React, { useMemo } from "react";
import { Popover } from "antd";
import { EyeOutlined } from "@ant-design/icons";
//#region src/components/table/Actions/component/ColumnsSetting/index.tsx
const ColumnsSetting = (props) => {
	const { value, onChange } = props;
	const content = useMemo(() => {
		return /* @__PURE__ */ React.createElement(PopoverContent, {
			value,
			onChange
		});
	}, [value, onChange]);
	return /* @__PURE__ */ React.createElement(Popover, {
		content,
		arrow: false,
		placement: "bottomRight",
		trigger: "click"
	}, /* @__PURE__ */ React.createElement(ButtonIcon, { isActive: !!(value === null || value === void 0 ? void 0 : value.filter((item) => !item.isShow).length) }, /* @__PURE__ */ React.createElement(EyeOutlined, { style: {
		cursor: "pointer",
		fontSize: 18
	} })));
};
//#endregion
export { ColumnsSetting as default };
