import React from 'react' import { motion, useReducedMotion } from 'framer-motion' /** * PublishCheckBadge – a single status item for the review section */ function PublishCheckBadge({ label, ok }) { return ( {label} ) } /** * Step3Publish * * Step 3 of the upload wizard: review summary and publish action. * Shows a compact artwork preview, metadata summary, and readiness badges. */ export default function Step3Publish({ headingRef, // Asset primaryFile, primaryPreviewUrl, isArchive, screenshots, fileMetadata, // Metadata metadata, // Readiness canPublish, uploadReady, }) { const prefersReducedMotion = useReducedMotion() const quickTransition = prefersReducedMotion ? { duration: 0 } : { duration: 0.2, ease: 'easeOut' } const hasPreview = Boolean(primaryPreviewUrl && !isArchive) const checks = [ { label: 'File uploaded', ok: uploadReady }, { label: 'Scan passed', ok: uploadReady }, { label: 'Preview ready', ok: hasPreview || (isArchive && screenshots.length > 0) }, { label: 'Rights confirmed', ok: Boolean(metadata.rightsAccepted) }, ] return (
{/* Step header */}

Review & publish

Everything looks good? Hit Publish to make your artwork live.

{/* Preview + summary */}
{/* Artwork thumbnail */}
{hasPreview ? (
Artwork preview
) : (
)}
{/* Summary */}

{metadata.title || Untitled artwork}

{metadata.contentType && ( Type: {metadata.contentType} )} {metadata.rootCategoryId && ( Category: {metadata.rootCategoryId} )} {metadata.subCategoryId && ( Sub: {metadata.subCategoryId} )}
Tags: {(metadata.tags || []).length} {!isArchive && fileMetadata?.resolution && fileMetadata.resolution !== '—' && ( Resolution: {fileMetadata.resolution} )} {isArchive && ( Screenshots: {screenshots.length} )}
{metadata.description && (

{metadata.description}

)}
{/* Readiness badges */}

Readiness checks

{checks.map((check) => ( ))}
{/* Not-ready notice */} {!canPublish && ( {!uploadReady ? 'Waiting for upload processing to complete…' : !metadata.rightsAccepted ? 'Please confirm rights in the Details step to enable publishing.' : 'Complete all required fields to enable publishing.'} )}
) }