import { Button } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import AlertComponent from "../alert/alert.component";

export default function ResetForm({ resetFields }) {
  const { t } = useTranslation();
  return (
    <AlertComponent
      message={
        <div>
          {t("general.messages.unsavedchanges")}
          <Button style={{ marginLeft: "20px" }} onClick={() => resetFields()}>
            {t("general.actions.reset")}
          </Button>
        </div>
      }
      closable
    />
  );
}
