import classnames from "classnames";
import React from "react";
import Popover from "../Popover";
import getClasses from "./styles";

var FloatButton = function FloatButton(props) {
  var _props$classes = props.classes,
      classes = _props$classes === void 0 ? {} : _props$classes,
      buttonContent = props.buttonContent,
      content = props.content,
      buttonColor = props.buttonColor,
      round = props.round,
      setOpen = props.setOpen;
  var styles = getClasses({
    buttonColor: buttonColor,
    round: round
  });
  return /*#__PURE__*/React.createElement(Popover, {
    onOpenChange: function onOpenChange(open) {
      return setOpen(open);
    }
  }, /*#__PURE__*/React.createElement(Popover.Trigger, {
    className: classnames(styles.anchor, classes.anchor)
  }, /*#__PURE__*/React.createElement("button", {
    type: "button",
    className: classnames(styles.button, classes.button)
  }, buttonContent)), /*#__PURE__*/React.createElement(Popover.Content, {
    className: classnames(styles.paper, classes.paper)
  }, content));
};

FloatButton.defaultProps = {
  buttonColor: "green",
  round: false,
  open: false,
  setOpen: function setOpen() {}
};
export default FloatButton;