'use client'
import { useMediaById } from '@admin/hooks/use-media'
import { ImageIcon, Plus } from 'lucide-react'
import Image from 'next/image'
// The 32px tile a phone settings row shows for a media field: the chosen image, a generic glyph
// for other files, or a dashed add tile while empty.
export function FormFieldRowMedia({ value }: { value?: string | null }) {
const { data: media } = useMediaById(value || undefined)
if (!value) {
return (
)
}
if (media?.url && media.contentType.startsWith('image/')) {
return (
)
}
return (
)
}