import React, { useMemo } from "react";
import { Popover } from "antd";
import Rows01 from "@pisell/icon/es/Rows01";
import ButtonIcon from "../ButtonIcon";
import PopoverContent from "./PopoverContent";
var Group = function Group(props) {
  var value = props.value,
    onChange = props.onChange,
    setting = props.setting;
  var list = setting.list;
  var content = useMemo(function () {
    return /*#__PURE__*/React.createElement(PopoverContent, {
      columns: list,
      onChange: onChange,
      value: value
    });
  }, [list, value]);
  return /*#__PURE__*/React.createElement(Popover, {
    content: content,
    arrow: false,
    placement: "bottomRight",
    trigger: "click"
  }, /*#__PURE__*/React.createElement(ButtonIcon, {
    isActive: !!(value !== null && value !== void 0 && value.length)
  }, /*#__PURE__*/React.createElement(Rows01, {
    style: {
      cursor: "pointer",
      fontSize: 18
    }
  })));
};
export default Group;