e.stopPropagation()}
+ className={`
+ relative flex flex-col mx-auto w-[calc(100%-16px)] tablet:w-[384px] desktop:w-[486px]
+ space-y-4 tablet:space-y-6 bg-surface-elevate-l2 p-6 rounded-3xl
+ `}
+ >
+
+
+
+
+ 리포트 생성이 완료되었습니다.
+
+
+ [{item.title}] 리포트가 완성되었습니다.
+
+
+
+
+
+ )
+ }
+
+ // ✅ CASE B: 생성 중인데 사용자가 '닫기'를 누른 경우
+ if (item.isHidden) {
+ return null
+ }
+
+ // ✅ CASE C: 생성 중이고 화면에 보여야 하는 경우 (진행 모달)
+ return (
+ navigate(`/report/${item.reportId}?video=${item.videoId}`)}
+ className={`
+ relative flex flex-col mx-auto w-[calc(100%-16px)] tablet:w-[384px] desktop:w-[486px]
+ space-y-4 tablet:space-y-6 bg-surface-elevate-l2 p-6 rounded-3xl
+ `}
+ >
+
+
+
+
+ {currentStep === 1 && '유튜브 데이터 수집 중..'}
+ {currentStep === 2 && '영상 지표 및 댓글 분석 중..'}
+ {currentStep === 3 && '이탈 구간과 알고리즘 최적화 분석 중..'}
+ {currentStep === 4 && '리포트 완성'}
+
+
+ [{item.title}] 리포트를 생성 중입니다.
+
+
+ {/* 프로그레스 바 */}
+
+
+
+
+
+ )
+}
+
+export const GlobalProcessingModal = () => {
+ const { pathname } = useLocation()
+ const reports = useReportStore((state) => state.reports)
+ const isAuth = useAuthStore((state) => state.isAuth)
+
+ if (!isAuth) return null
+ if (reports.length === 0) return null
+
+ return (
+