import { Modal, ModalBody, ModalContent, ModalHeader } from "@heroui/react";
import { useTranslation } from "react-i18next";
import LogDetail from "@/components/LogDetail";

type RoundEvaluationOverrideDetailModalProps = {
  isOpen: boolean;
  logId: number | null;
  onOpenChange: (isOpen: boolean) => void;
};

export default function RoundEvaluationOverrideDetailModal({
  isOpen,
  logId,
  onOpenChange,
}: RoundEvaluationOverrideDetailModalProps) {
  const { t } = useTranslation("common");

  return (
    <Modal isOpen={isOpen} onOpenChange={onOpenChange} size="6xl" scrollBehavior="inside">
      <ModalContent>
        <ModalHeader className="flex flex-col gap-1">
          {t("override_detail_title") ?? "Detail logu"}
        </ModalHeader>
        <ModalBody>{logId ? <LogDetail logId={logId} /> : null}</ModalBody>
      </ModalContent>
    </Modal>
  );
}
