import { Building, MapPin, Calendar, Globe, ExternalLink, AlertCircle } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { Separator } from '@/components/ui/separator'; import { FlexibleDateDisplay } from '@/components/ui/flexible-date-display'; import type { DatePrecision } from '@/components/ui/flexible-date-input'; import type { CompanySubmissionData } from '@/types/submission-data'; interface RichCompanyDisplayProps { data: CompanySubmissionData; actionType: 'create' | 'edit' | 'delete'; showAllFields?: boolean; } export function RichCompanyDisplay({ data, actionType, showAllFields = true }: RichCompanyDisplayProps) { const getCompanyTypeColor = (type: string | undefined) => { if (!type) return 'bg-gray-500'; switch (type.toLowerCase()) { case 'manufacturer': return 'bg-blue-500'; case 'operator': return 'bg-green-500'; case 'designer': return 'bg-purple-500'; case 'property_owner': return 'bg-orange-500'; default: return 'bg-gray-500'; } }; return (
{/* Header Section */}

{data.name}

{(data.company_type || 'Unknown')?.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase())} {data.person_type && ( {data.person_type.replace(/\b\w/g, l => l.toUpperCase())} )} {actionType === 'create' && ( New Company )} {actionType === 'edit' && ( Edit )} {actionType === 'delete' && ( Delete )}
{/* Key Information */}
{/* Founded Date */} {(data.founded_date || data.founded_year) && (
Founded
{data.founded_date ? ( ) : ( {data.founded_year} )}
)} {/* Location */} {data.headquarters_location && (
Headquarters
{data.headquarters_location}
)}
{/* Description */} {data.description && (
Description
{data.description}
)} {/* Website & Source */} {(data.website_url || data.source_url) && (
{data.website_url && ( Official Website )} {data.source_url && ( Source )}
)} {/* Submission Notes */} {data.submission_notes && (
Submitter Notes
{data.submission_notes}
)} {/* Images Preview */} {(data.logo_url || data.banner_image_url || data.card_image_url) && (
Images
{data.logo_url && (
Logo
Logo
)} {data.banner_image_url && (
Banner
Banner {data.banner_image_id && ( ID: {data.banner_image_id.slice(0, 8)}... )}
)} {data.card_image_url && (
Card
Card {data.card_image_id && ( ID: {data.card_image_id.slice(0, 8)}... )}
)}
)}
); }