'use client'; /** * The selection bar and review dialog of a client proofing link. * * Stands in for the anonymous mode's bar and share/export modal: there is * nothing to share (the link already is the share), the selection saves itself, * and the one action that matters is submitting it to the photographer. */ import { useCallback, useState } from 'react'; import { useProofing } from './ProofingContext'; import { useDictionary } from './I18nProvider'; import { useModalDialog } from '@/hooks/useModalDialog'; const barStyle: React.CSSProperties = { position: 'fixed', bottom: '24px', right: '24px', left: 'auto', zIndex: 990, display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: '12px', padding: '8px 16px', borderRadius: '30px', background: 'var(--bg-card, #1e1e1e)', color: 'var(--text-primary, #ffffff)', border: '1px solid var(--border-subtle, rgba(255,255,255,0.15))', boxShadow: '0 8px 24px rgba(0,0,0,0.4)', backdropFilter: 'blur(8px)', maxWidth: 'calc(100vw - 32px)', }; const primaryButton: React.CSSProperties = { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.5rem', padding: '0.75rem 1rem', borderRadius: 'var(--radius-sm, 6px)', background: 'var(--accent, #e60012)', // Black or white, whichever the layout found to carry on this accent. color: 'var(--on-accent, #fff)', border: 'none', fontWeight: 500, // The same for the )} {session.submitted ? p.locked : status} {open && (
e.stopPropagation()} style={{ background: 'var(--bg-card, #1e1e1e)', color: 'var(--text-primary, #ffffff)', borderRadius: 'var(--radius-md, 12px)', border: '1px solid var(--border-subtle, rgba(255,255,255,0.1))', padding: '1.5rem', maxWidth: '480px', width: '100%', boxShadow: '0 20px 40px rgba(0,0,0,0.5)', }} >

{p.modalTitle(count)}

{session.submitted ? p.submitted : count === 0 ? p.empty : p.confirmSubmit(count)}

{!session.submitted && ( )} {canDownload && count > 0 && selectionSaved && ( {p.downloadSelection} )} {canDownload && session.download === 'album' && ( {p.downloadAll} )} {session.download !== 'none' && downloadsLeft !== null && (

{downloadsLeft > 0 ? p.downloadsLeft(downloadsLeft) : t.download.limitReached}

)} {session.saveState === 'error' && (

{p.saveFailed}

)}
)} ); }