import React from "react";
import PropTypes from "prop-types";
import { makeStyles } from "@mui/styles";
import { Typography } from "@mui/material";
import useTranslation from "../../utils/useTranslation";
import PermalinkInput from "../PermalinkInput";
import PermalinkButton from "../PermalinkButton";
const useStyles = makeStyles(theme => ({
  margin: {
    marginTop: theme.spacing(2)
  }
}));
function SharePermalinkButton(_ref) {
  let {
    buttonProps
  } = _ref;
  const classes = useStyles();
  const {
    t
  } = useTranslation();
  return /*#__PURE__*/React.createElement(PermalinkButton, {
    buttonProps: buttonProps || {}
  }, locationHref => {
    return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PermalinkInput, {
      value: locationHref
    }), /*#__PURE__*/React.createElement(Typography, {
      className: classes.margin
    }, t("Sie können auch den Link aus der Adresszeile des Browsers kopieren.")));
  });
}
SharePermalinkButton.propTypes = {
  buttonProps: PropTypes.object
};
export default /*#__PURE__*/React.memo(SharePermalinkButton);
//# sourceMappingURL=SharePermalinkButton.js.map