import type { SellerLead, Buyer, Match, Outreach } from "@/types";

export const mockSellerLeads: SellerLead[] = [
  {
    id: "lead-1",
    agent_id: "agent-1",
    address: "1250 Broadway, 15th Floor",
    asset_type: "Office",
    asking_price: 12500000,
    cap_rate: 6.25,
    noi: 781250,
    sqft: 45000,
    units: undefined,
    year_built: 2001,
    market: "New York, NY",
    city: "New York",
    state: "NY",
    notes: "Class A office with 95% occupancy. Long-term tenants with staggered lease expirations.",
    status: "active",
    created_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 2 * 86400000).toISOString(),
  },
  {
    id: "lead-2",
    agent_id: "agent-1",
    address: "8900 Collins Ave",
    asset_type: "Multifamily",
    asking_price: 28000000,
    cap_rate: 5.1,
    noi: 1428000,
    sqft: 120000,
    units: 156,
    year_built: 2018,
    market: "Miami, FL",
    city: "Miami",
    state: "FL",
    notes: "Luxury waterfront multifamily. Amenity-rich with pool, gym, rooftop lounge. 97% occupied.",
    status: "active",
    created_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
  },
  {
    id: "lead-3",
    agent_id: "agent-1",
    address: "4500 Industrial Blvd",
    asset_type: "Industrial",
    asking_price: 8750000,
    cap_rate: 7.2,
    noi: 630000,
    sqft: 85000,
    units: undefined,
    year_built: 2015,
    market: "Dallas, TX",
    city: "Dallas",
    state: "TX",
    notes: "Modern distribution warehouse with 32ft clear height. Triple net lease with 8 years remaining.",
    status: "matched",
    created_at: new Date(Date.now() - 10 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 3 * 86400000).toISOString(),
  },
  {
    id: "lead-4",
    agent_id: "agent-1",
    address: "200 Peachtree St NW",
    asset_type: "Retail",
    asking_price: 4200000,
    cap_rate: 6.8,
    noi: 285600,
    sqft: 18000,
    units: undefined,
    year_built: 1998,
    market: "Atlanta, GA",
    city: "Atlanta",
    state: "GA",
    notes: "Strip center anchored by national grocery tenant. 3 inline suites with local tenants.",
    status: "active",
    created_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
  },
  {
    id: "lead-5",
    agent_id: "agent-1",
    address: "750 Congress Ave",
    asset_type: "Mixed-Use",
    asking_price: 15800000,
    cap_rate: 5.8,
    noi: 916400,
    sqft: 62000,
    units: 48,
    year_built: 2020,
    market: "Austin, TX",
    city: "Austin",
    state: "TX",
    notes: "Mixed-use with ground floor retail and 48 residential units above. Downtown location.",
    status: "pending",
    created_at: new Date(Date.now() - 7 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 4 * 86400000).toISOString(),
  },
  {
    id: "lead-6",
    agent_id: "agent-1",
    address: "1100 S Ocean Blvd",
    asset_type: "Hospitality",
    asking_price: 35000000,
    cap_rate: 4.5,
    noi: 1575000,
    sqft: 95000,
    units: 120,
    year_built: 2010,
    market: "Miami, FL",
    city: "Palm Beach",
    state: "FL",
    notes: "Boutique hotel on the beach. Recently renovated. Strong RevPAR metrics.",
    status: "active",
    created_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 3 * 86400000).toISOString(),
  },
];

export const mockBuyers: Buyer[] = [
  {
    id: "buyer-1",
    agent_id: "agent-1",
    name: "Marcus Williams",
    company: "Blackstone Capital Partners",
    email: "marcus@blackstonecap.com",
    phone: "(212) 555-0101",
    asset_types: ["Office", "Mixed-Use"],
    target_locations: ["New York, NY", "Boston, MA", "Chicago, IL"],
    price_min: 5000000,
    price_max: 50000000,
    cap_rate_min: 5.0,
    cap_rate_max: 7.5,
    preferences: "Class A properties, value-add opportunities",
    status: "high-intent",
    engagement_score: 92,
    last_contacted_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 30 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
  },
  {
    id: "buyer-2",
    agent_id: "agent-1",
    name: "Sarah Chen",
    company: "Pacific Capital Group",
    email: "sarah@pacificcap.com",
    phone: "(310) 555-0202",
    asset_types: ["Multifamily", "Mixed-Use"],
    target_locations: ["Miami, FL", "Tampa, FL", "Orlando, FL", "Atlanta, GA"],
    price_min: 10000000,
    price_max: 75000000,
    cap_rate_min: 4.5,
    cap_rate_max: 6.5,
    preferences: "New construction preferred, 100+ units",
    status: "active",
    engagement_score: 78,
    last_contacted_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 45 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 2 * 86400000).toISOString(),
  },
  {
    id: "buyer-3",
    agent_id: "agent-1",
    name: "David Rodriguez",
    company: "Lone Star Investments",
    email: "david@lonestarinv.com",
    phone: "(214) 555-0303",
    asset_types: ["Industrial", "Land"],
    target_locations: ["Dallas, TX", "Houston, TX", "Austin, TX", "San Antonio, TX"],
    price_min: 3000000,
    price_max: 25000000,
    cap_rate_min: 6.0,
    cap_rate_max: 9.0,
    preferences: "NNN leases, distribution/warehouse, last-mile logistics",
    status: "active",
    engagement_score: 85,
    last_contacted_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 60 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
  },
  {
    id: "buyer-4",
    agent_id: "agent-1",
    name: "Jennifer Park",
    company: "Summit Realty Advisors",
    email: "jennifer@summitrealtyad.com",
    phone: "(404) 555-0404",
    asset_types: ["Retail", "Mixed-Use"],
    target_locations: ["Atlanta, GA", "Charlotte, NC", "Nashville, TN"],
    price_min: 2000000,
    price_max: 15000000,
    cap_rate_min: 5.5,
    cap_rate_max: 8.0,
    preferences: "Anchored retail, grocery-anchored preferred",
    status: "active",
    engagement_score: 67,
    last_contacted_at: new Date(Date.now() - 7 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 90 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 5 * 86400000).toISOString(),
  },
  {
    id: "buyer-5",
    agent_id: "agent-1",
    name: "Robert Thompson",
    company: "Thompson Family Office",
    email: "robert@thompsonfamily.com",
    phone: "(305) 555-0505",
    asset_types: ["Multifamily", "Hospitality"],
    target_locations: ["Miami, FL", "Tampa, FL", "Nationwide"],
    price_min: 15000000,
    price_max: 100000000,
    cap_rate_min: 4.0,
    cap_rate_max: 6.0,
    preferences: "1031 exchange buyer, luxury properties, waterfront",
    status: "high-intent",
    engagement_score: 95,
    last_contacted_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 20 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
  },
  {
    id: "buyer-6",
    agent_id: "agent-1",
    name: "Amanda Foster",
    company: "Greenfield Development",
    email: "amanda@greenfielddev.com",
    phone: "(512) 555-0606",
    asset_types: ["Land", "Multifamily"],
    target_locations: ["Austin, TX", "Dallas, TX", "Denver, CO", "Phoenix, AZ"],
    price_min: 1000000,
    price_max: 20000000,
    cap_rate_min: undefined,
    cap_rate_max: undefined,
    preferences: "Development sites, entitled land, value-add multifamily",
    status: "active",
    engagement_score: 54,
    last_contacted_at: new Date(Date.now() - 14 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 120 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 10 * 86400000).toISOString(),
  },
  {
    id: "buyer-7",
    agent_id: "agent-1",
    name: "Michael Chang",
    company: "Horizon Capital",
    email: "michael@horizoncap.com",
    phone: "(312) 555-0707",
    asset_types: ["Office", "Industrial"],
    target_locations: ["Chicago, IL", "Minneapolis, MN"],
    price_min: 8000000,
    price_max: 40000000,
    cap_rate_min: 6.0,
    cap_rate_max: 8.5,
    preferences: "Stabilized assets, long-term hold",
    status: "unresponsive",
    engagement_score: 23,
    last_contacted_at: new Date(Date.now() - 30 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 180 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 30 * 86400000).toISOString(),
  },
  {
    id: "buyer-8",
    agent_id: "agent-1",
    name: "Lisa Nguyen",
    company: "Evergreen REIT",
    email: "lisa@evergreenreit.com",
    phone: "(206) 555-0808",
    asset_types: ["Multifamily", "Office", "Retail"],
    target_locations: ["Nationwide"],
    price_min: 20000000,
    price_max: 200000000,
    cap_rate_min: 4.5,
    cap_rate_max: 7.0,
    preferences: "Core and core-plus, ESG-focused",
    status: "active",
    engagement_score: 71,
    last_contacted_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 60 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 3 * 86400000).toISOString(),
  },
];

export const mockMatches: Match[] = [
  {
    id: "match-1",
    lead_id: "lead-1",
    buyer_id: "buyer-1",
    match_score: 94.5,
    status: "sent",
    created_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[0],
    buyer: mockBuyers[0],
  },
  {
    id: "match-2",
    lead_id: "lead-2",
    buyer_id: "buyer-2",
    match_score: 91.2,
    status: "interested",
    created_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[1],
    buyer: mockBuyers[1],
  },
  {
    id: "match-3",
    lead_id: "lead-2",
    buyer_id: "buyer-5",
    match_score: 88.7,
    status: "sent",
    created_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[1],
    buyer: mockBuyers[4],
  },
  {
    id: "match-4",
    lead_id: "lead-3",
    buyer_id: "buyer-3",
    match_score: 96.1,
    status: "interested",
    created_at: new Date(Date.now() - 10 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[2],
    buyer: mockBuyers[2],
  },
  {
    id: "match-5",
    lead_id: "lead-4",
    buyer_id: "buyer-4",
    match_score: 87.3,
    status: "pending",
    created_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 1 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[3],
    buyer: mockBuyers[3],
  },
  {
    id: "match-6",
    lead_id: "lead-5",
    buyer_id: "buyer-1",
    match_score: 72.8,
    status: "pending",
    created_at: new Date(Date.now() - 7 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 7 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[4],
    buyer: mockBuyers[0],
  },
  {
    id: "match-7",
    lead_id: "lead-6",
    buyer_id: "buyer-5",
    match_score: 82.4,
    status: "sent",
    created_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[5],
    buyer: mockBuyers[4],
  },
  {
    id: "match-8",
    lead_id: "lead-1",
    buyer_id: "buyer-8",
    match_score: 68.5,
    status: "pending",
    created_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    updated_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    seller_lead: mockSellerLeads[0],
    buyer: mockBuyers[7],
  },
];

export const mockOutreach: Outreach[] = [
  {
    id: "outreach-1",
    match_id: "match-1",
    channel: "email",
    subject: "New Office Opportunity — New York, NY",
    body: "Hi Marcus, I have a new Class A office opportunity...",
    status: "opened",
    sent_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    opened_at: new Date(Date.now() - 1.5 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    match: mockMatches[0],
  },
  {
    id: "outreach-2",
    match_id: "match-2",
    channel: "email",
    subject: "New Multifamily Opportunity — Miami, FL",
    body: "Hi Sarah, luxury waterfront multifamily hitting the market...",
    status: "replied",
    sent_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    opened_at: new Date(Date.now() - 4.5 * 86400000).toISOString(),
    replied_at: new Date(Date.now() - 4 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    match: mockMatches[1],
  },
  {
    id: "outreach-3",
    match_id: "match-2",
    channel: "sms",
    body: "Sarah, new 156-unit multifamily in Miami: $28M, 5.1% cap. Reply YES for details.",
    status: "delivered",
    sent_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 5 * 86400000).toISOString(),
    match: mockMatches[1],
  },
  {
    id: "outreach-4",
    match_id: "match-4",
    channel: "email",
    subject: "New Industrial Opportunity — Dallas, TX",
    body: "Hi David, modern distribution warehouse...",
    status: "replied",
    sent_at: new Date(Date.now() - 10 * 86400000).toISOString(),
    opened_at: new Date(Date.now() - 9 * 86400000).toISOString(),
    clicked_at: new Date(Date.now() - 9 * 86400000).toISOString(),
    replied_at: new Date(Date.now() - 8 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 10 * 86400000).toISOString(),
    match: mockMatches[3],
  },
  {
    id: "outreach-5",
    match_id: "match-3",
    channel: "email",
    subject: "New Multifamily Opportunity — Miami, FL",
    body: "Hi Robert, luxury waterfront opportunity matching your criteria...",
    status: "sent",
    sent_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    match: mockMatches[2],
  },
  {
    id: "outreach-6",
    match_id: "match-7",
    channel: "email",
    subject: "New Hospitality Opportunity — Miami, FL",
    body: "Hi Robert, boutique beachfront hotel...",
    status: "opened",
    sent_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    opened_at: new Date(Date.now() - 2 * 86400000).toISOString(),
    created_at: new Date(Date.now() - 3 * 86400000).toISOString(),
    match: mockMatches[6],
  },
];

export const recentActivity = [
  { type: "match", message: "Marcus Williams matched to 1250 Broadway (94.5%)", time: "2h ago" },
  { type: "reply", message: "Sarah Chen replied to Miami Multifamily deal", time: "4h ago" },
  { type: "nda", message: "David Rodriguez signed NDA for Dallas Industrial", time: "1d ago" },
  { type: "lead", message: "New seller lead added: 200 Peachtree St NW", time: "1d ago" },
  { type: "open", message: "Robert Thompson opened Hospitality deal email", time: "2d ago" },
  { type: "match", message: "Jennifer Park matched to Atlanta Retail (87.3%)", time: "2d ago" },
];
