import React from "react";
import { Box, Button, Chip, CircularProgress, Typography } from "@mui/material";
import { useI18n } from "../i18n/I18nProvider";
import { CandidateFit, FocusPlanResponse, InterviewPrepResponse, MatchScore, ReadinessResponse } from "../types";
import { DraftCard, ListCard, MatchScoreCard, SectionChips, TwoColumnSection } from "./JobDetailsPanels";
type Props = {
tab: number;
matchScore: MatchScore | null;
loadingMatchScore: boolean;
candidateFit: CandidateFit | null;
loadingCandidateFit: boolean;
regenerateCandidateFit: () => void;
fitLevel: { label: string; color: "success" | "warning" | "default" } | null;
focusPlan: FocusPlanResponse | null;
loadingFocusPlan: boolean;
regenerateFocusPlan: () => void;
interviewPrep: InterviewPrepResponse | null;
loadingInterviewPrep: boolean;
regenerateInterviewPrep: () => void;
readiness: ReadinessResponse | null;
loadingReadiness: boolean;
};
export default function JobInsightTabs(props: Props) {
const { t } = useI18n();
const { tab, matchScore, loadingMatchScore, candidateFit, loadingCandidateFit, regenerateCandidateFit, fitLevel, focusPlan, loadingFocusPlan, regenerateFocusPlan, interviewPrep, loadingInterviewPrep, regenerateInterviewPrep, readiness, loadingReadiness } = props;
return <>
{tab === 5 && (
{loadingCandidateFit ? : candidateFit ? (
{t("jobDetailsAiFitHint")}
{t("jobDetailsHowYouMatch")}{candidateFit.matchSummary}
= 75 ? "success" : candidateFit.matchScore >= 55 ? "warning" : "default"} size="small" />
{fitLevel ? : null}
) : {t("jobDetailsCandidateFitEmpty")}}
)}
{tab === 6 && (
{loadingFocusPlan ? : focusPlan ? (
) : {t("jobDetailsNoFocusPlan")}}
)}
{tab === 7 && (
{loadingInterviewPrep ? : interviewPrep ? (
) : {t("jobDetailsNoInterviewPrep")}}
)}
{tab === 8 && (
{loadingReadiness ? : readiness ? (
{t("jobDetailsApplicationReadiness")}
= 80 ? "success" : readiness.score >= 60 ? "warning" : "default"} />
) : {t("jobDetailsNoReadiness")}}
)}
>;
}