'use client'; import { format } from 'date-fns'; import type { DetailTab } from '@/components/shared/detail-layout'; import { NotesList } from '@/components/shared/notes-list'; import { RecommendationList } from '@/components/interests/recommendation-list'; import { InterestTimeline } from '@/components/interests/interest-timeline'; interface InterestTabsOptions { interestId: string; currentUserId?: string; interest: { eoiStatus: string | null; contractStatus: string | null; depositStatus: string | null; reservationStatus: string | null; dateFirstContact: string | null; dateLastContact: string | null; dateEoiSent: string | null; dateEoiSigned: string | null; dateContractSent: string | null; dateContractSigned: string | null; dateDepositReceived: string | null; reminderEnabled: boolean; reminderDays: number | null; reminderLastFired: string | null; notes: string | null; }; } function InfoRow({ label, value }: { label: string; value?: string | null }) { if (!value) return null; return (
{label}
{value}
); } function formatDate(date: string | null) { if (!date) return null; return format(new Date(date), 'MMM d, yyyy'); } function OverviewTab({ interest }: { interest: InterestTabsOptions['interest'] }) { return (
{/* EOI & Contract Status */}

Status

{/* Key Dates */}

Key Dates

{/* Reminder */} {interest.reminderEnabled && (

Reminder

)} {/* Notes */} {interest.notes && (

Notes

{interest.notes}

)}
); } export function getInterestTabs({ interestId, currentUserId, interest, }: InterestTabsOptions): DetailTab[] { return [ { id: 'overview', label: 'Overview', content: , }, { id: 'notes', label: 'Notes', content: ( ), }, { id: 'documents', label: 'Documents', content: (

Documents tab available after document system is built

), }, { id: 'files', label: 'Files', content: (

Files tab available after file system is built

), }, { id: 'recommendations', label: 'Recommendations', content: , }, { id: 'activity', label: 'Activity', content: , }, ]; }