import React from 'react'; import { useTranslation } from 'react-i18next'; import { p2vProgress } from '../../utils/p2vApi'; import { GATE_ORDER, GateKey, PlayreelJob } from '../../utils/playreelApi'; interface PlayreelMakingContentProps { job: PlayreelJob | null; /** 실패한 잡을 버리고 처음부터. 실패하면 크레딧이 환불되므로 같은 잡을 다시 돌리지 않는다 */ onDiscard: () => void; busy: boolean; /** 방금 자동 승인한 게이트가 있으면 그 안내. 다음 확인 요청이 올 때까지 보여준다 */ autoApprovedGate?: GateKey | null; } /** * 롱컷 진행·실패 화면. 검수 게이트 사이사이의 대기 구간에 쓰인다. * * 진행바는 스테이지 완료 수 기반이라 구간 사이에서 멈춰 보인다 — * 스피너가 "살아 있다"를 따로 알린다(PosterMakingContent 와 같은 판단). */ const PlayreelMakingContent: React.FC = ({ job, onDiscard, busy, autoApprovedGate, }) => { const { t } = useTranslation(); if (!job) return null; const percent = p2vProgress(job); if (job.status === 'failed') { return (
{job.name}

{t('playreel.making.failTitle')}

{t(`playreel.stages.${job.error?.stage}`, { defaultValue: job.error?.stage ?? '' })}

{job.error?.detail &&
{job.error.detail}
}

{t('playreel.making.refunded')}

); } const stageKey = job.stage ?? ''; const copy = t(`playreel.running.${stageKey}`, { defaultValue: t('playreel.making.preparing') }); return (
{job.name}

{t('playreel.making.title')}