'use client'; import { useState } from 'react'; import { Box, Avatar, IconButton, TextField, Typography, Paper, } from '@mui/material'; import { PhotoCamera, Person } from '@mui/icons-material'; interface PhotoUploadProps { value: string; onChange: (url: string) => void; label: string; disabled?: boolean; size?: number; } export function PhotoUpload({ value, onChange, label, disabled = false, size = 100 }: PhotoUploadProps) { const [imageError, setImageError] = useState(false); const handleImageError = () => { setImageError(true); }; const handleImageLoad = () => { setImageError(false); }; return ( {label} {!value || imageError ? : null} { // Future: Open file picker for actual upload // For now, user can paste URL below }} > onChange(e.target.value)} fullWidth size="small" placeholder="https://example.com/photo.jpg" disabled={disabled} helperText="Paste an image URL or upload a photo" /> ); }