import { Button, Popover, Tooltip } from "antd";
import { BiLayer } from "react-icons/all";
import { LayersVisibility } from "./LayersVisibility";

export const LayersControl = ({postGroups}) => {
  return (
    <Popover
      content={<LayersVisibility postGroups={postGroups} />}
      trigger="click"
      placement={"leftBottom"}
    >
      <Tooltip title="Слои">
        <Button className="absolute bottom-[20px] right-[20px] flex items-center justify-center p-3">
          <BiLayer className="w-4 h-4" />
        </Button>
      </Tooltip>
    </Popover>
  );
};
