// mock-data.jsx — Nigerian small businesses, investors, deals, updates.

const MOCK_BUSINESSES = [
  {
    id: "aisha",
    name: "Aisha Bello",
    business: "Layi Bakehouse",
    category: "Bakery",
    city: "Yaba, Lagos",
    initials: "AB",
    color: "#C2553A",
    photoLab: "interior · sourdough rack",
    yearsRunning: 3,
    employees: 4,
    monthlyRevenue: { min: 850000, max: 1400000 },
    askMin: 600000,
    askMax: 1200000,
    use: "Second deck oven + delivery bike for the Yaba/Surulere route.",
    pitch: "We bake sourdough, sausage rolls and meat pies for offices around Yaba. We sell out by 11am most days. The new oven doubles our morning batch.",
    returnTypes: ["Revenue share", "Fixed return"],
    returnHeadline: "8% revenue share · 18 months",
    cadence: ["Monthly", "Quarterly"],
    seasonality: "Strong Dec–Feb (weddings). Slow June–Aug.",
    risk: "Medium",
    matchScore: 94,
    investors: 0,
    target: 1200000,
    raised: 720000,
    tags: ["Verified ID", "POS history", "Has CAC"],
  },
  {
    id: "tunde",
    name: "Tunde Okafor",
    business: "Studio Adunni",
    category: "Fashion",
    city: "Surulere, Lagos",
    initials: "TO",
    color: "#2F5D3F",
    photoLab: "atelier · ready-to-wear rail",
    yearsRunning: 5,
    employees: 6,
    monthlyRevenue: { min: 1200000, max: 2400000 },
    askMin: 1500000,
    askMax: 2500000,
    use: "Bulk fabric for AW26 collection + part-time pattern cutter.",
    pitch: "Made-to-measure womenswear for Lagos working women. Repeat clients drive 60% of sales. Wholesale orders from two boutiques starting March.",
    returnTypes: ["Revenue share", "Equity"],
    returnHeadline: "10% revenue share · 24 months",
    cadence: ["Monthly"],
    seasonality: "Peaks Oct–Jan (owambe season).",
    risk: "Low",
    matchScore: 89,
    target: 2500000,
    raised: 1800000,
    tags: ["Verified ID", "Bank statement", "2 yr trail"],
  },
  {
    id: "chinedu",
    name: "Chinedu Eze",
    business: "Cutz by Chinedu",
    category: "Barbing",
    city: "Wuse 2, Abuja",
    initials: "CE",
    color: "#E5A04A",
    photoLab: "shopfront · 4 chairs",
    yearsRunning: 4,
    employees: 3,
    monthlyRevenue: { min: 600000, max: 900000 },
    askMin: 300000,
    askMax: 700000,
    use: "Two more barbing chairs and a small grooming retail shelf.",
    pitch: "Highest rated barbershop in Wuse 2 (4.9 on Google). Adding chairs reduces wait, retail shelf adds 25% margin per visit.",
    returnTypes: ["Fixed return"],
    returnHeadline: "12% fixed · 12 months",
    cadence: ["Monthly", "Quarterly"],
    seasonality: "Steady year-round.",
    risk: "Low",
    matchScore: 86,
    target: 700000,
    raised: 280000,
    tags: ["Verified ID", "POS history"],
  },
  {
    id: "blessing",
    name: "Blessing Adeyemi",
    business: "Mama B's Kitchen",
    category: "Food",
    city: "Ikeja, Lagos",
    initials: "BA",
    color: "#6B3F4E",
    photoLab: "lunch counter · jollof",
    yearsRunning: 2,
    employees: 5,
    monthlyRevenue: { min: 1500000, max: 2200000 },
    askMin: 800000,
    askMax: 1500000,
    use: "Open second lunch counter inside Computer Village.",
    pitch: "₦1,500 lunch for office workers. We do 220 plates a day from one counter. Computer Village foot traffic is 4× our current spot.",
    returnTypes: ["Revenue share", "Fixed return"],
    returnHeadline: "9% revenue share · 18 months",
    cadence: ["Monthly", "Weekly"],
    seasonality: "Stable. Slight Dec dip.",
    risk: "Medium",
    matchScore: 81,
    target: 1500000,
    raised: 600000,
    tags: ["Verified ID", "References"],
  },
  {
    id: "kelechi",
    name: "Kelechi Nwosu",
    business: "Kels Phone Repair",
    category: "Repair",
    city: "Aba, Abia",
    initials: "KN",
    color: "#2C3E63",
    photoLab: "bench · iphone screens",
    yearsRunning: 3,
    employees: 2,
    monthlyRevenue: { min: 400000, max: 700000 },
    askMin: 200000,
    askMax: 500000,
    use: "Parts inventory so we stop turning customers away.",
    pitch: "Currently lose ~30 jobs a month because we don't stock screens. ₦400k of stock ends that.",
    returnTypes: ["Fixed return"],
    returnHeadline: "14% fixed · 12 months",
    cadence: ["Monthly"],
    seasonality: "Spikes after school resumption.",
    risk: "Medium",
    matchScore: 76,
    target: 500000,
    raised: 150000,
    tags: ["Verified ID"],
  },
];

const MOCK_INVESTORS = [
  {
    id: "femi",
    name: "Femi Adesanya",
    initials: "FA",
    color: "#2F5D3F",
    role: "Software engineer · Lagos",
    bio: "Backing food, fashion and personal-care businesses I'd actually visit. 6–24 month horizons.",
    rangeMin: 200000,
    rangeMax: 1500000,
    cadence: ["Monthly", "Quarterly"],
    returnTypes: ["Revenue share", "Fixed return"],
    interests: ["Bakery", "Fashion", "Food", "Barbing"],
    portfolio: 3,
    deployed: 2400000,
    avgReturn: 11.2,
  },
  {
    id: "ngozi",
    name: "Ngozi Okeke",
    initials: "NO",
    color: "#C2553A",
    role: "Doctor · Abuja",
    bio: "I want my money supporting women-run businesses. Fine with patience for the right deal.",
    rangeMin: 500000,
    rangeMax: 3000000,
    cadence: ["Monthly"],
    returnTypes: ["Revenue share", "Equity"],
    interests: ["Fashion", "Beauty", "Wellness"],
    portfolio: 2,
    deployed: 4200000,
    avgReturn: 13.5,
  },
  {
    id: "ibrahim",
    name: "Ibrahim Yusuf",
    initials: "IY",
    color: "#E5A04A",
    role: "Civil servant · Kano",
    bio: "First-time investor. Looking for 1–2 stable deals close to home.",
    rangeMin: 100000,
    rangeMax: 500000,
    cadence: ["Monthly", "Quarterly"],
    returnTypes: ["Fixed return"],
    interests: ["Food", "Repair"],
    portfolio: 0,
    deployed: 0,
    avgReturn: null,
  },
];

// Investors interested in Aisha (business owner POV)
const INTERESTED_IN_AISHA = [
  { investorId: "femi", offer: { amount: 800000, type: "Revenue share", terms: "8% of monthly revenue · 18 months", cadence: "Monthly" }, status: "new", whenISO: "2026-05-08T08:14:00" },
  { investorId: "ngozi", offer: { amount: 500000, type: "Revenue share", terms: "9% of monthly revenue · 24 months", cadence: "Monthly" }, status: "new", whenISO: "2026-05-07T19:42:00" },
  { investorId: "ibrahim", offer: { amount: 250000, type: "Fixed return", terms: "12% APR · 12 months", cadence: "Monthly" }, status: "viewing", whenISO: "2026-05-08T07:20:00" },
];

// Femi's portfolio (investor POV)
const FEMI_PORTFOLIO = [
  {
    id: "p1", businessId: "tunde",
    invested: 1200000, status: "active",
    structure: "Revenue share · 10% · 24 months",
    monthsIn: 7, monthsTotal: 24,
    paidBack: 480000,
    nextPayoutDate: "2026-05-15", nextPayoutAmount: 92000,
    last3: [88000, 105000, 92000],
    health: "healthy",
  },
  {
    id: "p2", businessId: "chinedu",
    invested: 400000, status: "active",
    structure: "Fixed · 12% APR · 12 months",
    monthsIn: 4, monthsTotal: 12,
    paidBack: 144000,
    nextPayoutDate: "2026-05-20", nextPayoutAmount: 36000,
    last3: [36000, 36000, 36000],
    health: "healthy",
  },
  {
    id: "p3", businessId: "blessing",
    invested: 800000, status: "watch",
    structure: "Revenue share · 9% · 18 months",
    monthsIn: 3, monthsTotal: 18,
    paidBack: 88000,
    nextPayoutDate: "2026-05-12", nextPayoutAmount: null,
    last3: [42000, 38000, 8000],
    health: "watch",
    flag: "Revenue down 78% in April. Hardship notice filed.",
  },
];

const FEMI_UPDATES = [
  {
    id: "u1", businessId: "tunde", whenISO: "2026-05-06T16:30:00",
    headline: "April revenue: ₦1.92M (+11% MoM)",
    body: "Two new wholesale orders from boutique in Lekki. Pattern cutter starts next week.",
    payout: 92000,
    photoLab: "AW26 fabric drop",
  },
  {
    id: "u2", businessId: "blessing", whenISO: "2026-05-04T09:12:00",
    headline: "Hardship notice — Computer Village fire",
    body: "There was a fire in our block last week. We lost two days of trading and two coolers. We've notified you per our agreement and would like to schedule a call.",
    payout: null,
    flag: true,
    photoLab: null,
  },
  {
    id: "u3", businessId: "chinedu", whenISO: "2026-05-02T18:00:00",
    headline: "April was steady — ₦36,000 to your wallet",
    body: "Same haircut volume as March. New chairs arrive Tuesday.",
    payout: 36000,
    photoLab: "shop · sunday cleanup",
  },
];

// Today's matches for Femi (sorted)
const FEMI_MATCHES_TODAY = ["aisha", "blessing"]; // ids
const FEMI_NEW_THIS_WEEK = ["chinedu", "kelechi"];

// AI report draft for Aisha (business reporting flow)
const AISHA_DRAFT_REPORT = {
  month: "April 2026",
  voiceTranscript: "Sooo April was decent — we did about ₦1.1 million, sold out most mornings except the rain week. Bought a new mixer for ₦180k cash. The flour price went up again, second time this year. Adding two new wholesale clients in May — one office in Yaba, one in Surulere. Oh and Tomi resigned, hiring her replacement next week.",
  metrics: {
    revenue: 1100000,
    revenueDelta: 4,
    expenses: 720000,
    profit: 380000,
    bestDay: { date: "Apr 18", amount: 68000 },
    soldOutDays: 22,
  },
  highlights: [
    "Sold out 22 of 26 trading days",
    "Bought a new dough mixer (₦180k cash)",
    "Two wholesale clients onboarding in May",
  ],
  watch: [
    "Flour price up 8% this month",
    "Lost one staff member — replacement starting",
  ],
  payoutDue: 88000,
};

window.MM_DATA = {
  businesses: MOCK_BUSINESSES,
  investors: MOCK_INVESTORS,
  interested: INTERESTED_IN_AISHA,
  portfolio: FEMI_PORTFOLIO,
  updates: FEMI_UPDATES,
  matchesToday: FEMI_MATCHES_TODAY,
  newThisWeek: FEMI_NEW_THIS_WEEK,
  draftReport: AISHA_DRAFT_REPORT,
  byId: (id) => MOCK_BUSINESSES.find(b => b.id === id) || MOCK_INVESTORS.find(i => i.id === id),
};
