import "../PopupShare/sharePopup.css";
import "./PopupExit.css";


import { useTranslation } from "react-i18next";

import { TSidebarPopup } from "utils/types";

export const PopupExit: React.FC<TSidebarPopup> = ({ setClose, onExit }) => {
  const { t } = useTranslation();

  return (
    <div className="popup exit-popup-container popup">
      <div className="popup-container-position">
        <h2 className="mobile-users-part-header-title">
          {t("popup-control-exit-title")}
        </h2>
        <div className="exit-popup-button-container">
          <button onClick={() => setClose()} className="button button-primary">
            {t("popup-control-no")}
          </button>
          <button
            style={{ height: "48px" }}
            onClick={() => onExit?.()}
            className=" button button-secondary"
          >
            {t("popup-control-yes")}
          </button>
        </div>
      </div>
    </div>
  );
};
