import share from "images/icons/Share.svg";

import { useTranslation } from "react-i18next";

import { Button } from "components/shared/Button/Button";

export const ShareButton: React.FC<any> = ({ onClick, isSidebarWide }) => {
  const button = {
    icon: share,
    active: "share-contro-btn",
    inactive: "share-contro-btn",
    type: "share",
  };

  const { t } = useTranslation();

  function handleClick() {
    onClick();
  }

  return (
    <button
      tabIndex={-1}
      onClick={handleClick}
      className="toolbar-button-area"
    >
      <Button isSidebarWide={isSidebarWide} button={button}></Button>
    </button>
  );
};
