import { useTranslation } from "react-i18next";

import { ReportType } from "@/contracts/client.schemas";

export function useReportTitle() {
	const { t } = useTranslation("translation");

	return {
		getTitle: (type: ReportType) => {
			switch (type) {
				case ReportType.ByState:
					return t("reportByObjectState");
				case ReportType.Journal:
					return t("objectJournal");
				case ReportType.SummaryEvents:
					return t("Summary report on events and alarms");
				default:
					throw new Error("Invalid report type");
			}
		},
	};
}
