// Third vehicle — an ACTIVE car currently under restoration, to show the
// "In Restoration" status and round out the collection.
// 1955 Mercedes-Benz 300 SL Gullwing "Silver Arrow". Demo data.

const VEHICLE_MERCEDES = {
  id: 'mercedes-300sl',
  hero: (typeof window !== 'undefined' && window.__resources && window.__resources.heroMercedes) || 'images/mercedes-300sl-gullwing.jpeg',
  heroTone: 'dark',
  lastUpdated: 'Sep 30, 2024',

  // Identity
  year: 1955,
  make: 'Mercedes-Benz',
  model: '300 SL Gullwing',
  trim: 'W198 · Alloy-spec',
  nickname: 'Silver Arrow',
  vin: '5500588',
  plate: 'GULLWING · CA',
  color: 'Silver Grey / Red Plaid',
  mileage: 34512,
  ownership: { since: 'June 2020', years: 4, months: 3 },

  // Status
  status: 'In Restoration',
  statusOptions: ['Active', 'In Restoration', 'Needs Service', 'In Storage', 'Transporting', 'For Sale', 'Sold'],

  // Location — at the restoration shop
  location: {
    name: 'Rudi & Company',
    city: 'Costa Mesa, CA',
    movedDate: 'Mar 2, 2024',
    climate: 'Restoration bay · body off chassis',
    other: [
      { name: 'Carmel Garage', city: 'Carmel, CA', count: 4 },
      { name: 'Rudi & Company', city: 'Costa Mesa, CA', count: 1, active: true },
    ],
  },

  // Value
  value: {
    current: 1_580_000,
    purchased: 1_300_000,
    purchasedAt: "Bonhams · Scottsdale",
    purchasedDate: 'June 2020',
    deltaTotal: 280_000,
    deltaPct: 21.5,
    appraisals: [
      { date: 'Sep 2024', source: 'Hagerty',            value: 1_580_000 },
      { date: 'Feb 2023', source: 'Gooding estimate',   value: 1_480_000 },
      { date: 'Aug 2021', source: 'Hagerty',            value: 1_360_000 },
      { date: 'Jun 2020', source: 'Purchase price',     value: 1_300_000 },
    ],
    investments: [
      { label: 'Body-off restoration (in progress)', cost: 142_000 },
      { label: 'Engine rebuild · M198 alloy',        cost: 64_000 },
      { label: 'Re-chrome & brightwork',             cost: 21_000 },
      { label: 'Interior · red plaid re-trim',       cost: 28_000 },
    ],
  },

  // Immediate attention
  attention: [
    { kind: 'service', label: 'Restoration milestone due', detail: 'Paint booth scheduled · Nov 4',   severity: 'soon' },
    { kind: 'parts',   label: 'Parts awaiting installation', detail: 'NOS Rudge knock-offs in transit', severity: 'watch' },
    { kind: 'docs',    label: 'Appraisal refresh',         detail: 'Update agreed value post-resto',    severity: 'watch' },
  ],

  // Health
  health: [
    { group: 'Engine',        status: 'Rebuilt',         note: 'M198 · mechanical injection · 2023',  icon: 'spark' },
    { group: 'Transmission',  status: 'Rebuilt',         note: '4-speed · matching',                  icon: 'gauge' },
    { group: 'Suspension',    status: 'In restoration',  note: 'Refinished · awaiting reassembly',     icon: 'wrench' },
    { group: 'Paint',         status: 'In restoration',  note: 'Bare metal · booth scheduled',         icon: 'spark' },
    { group: 'Interior',      status: 'In restoration',  note: 'Red plaid re-trim underway',           icon: 'archive' },
    { group: 'Electrical',    status: 'Good',            note: 'New harness fabricated',               icon: 'gauge' },
    { group: 'Documentation', status: 'Complete',        note: 'Data card · build records',            icon: 'certificate' },
  ],

  // Ownership chain
  ownership_chain: [
    { from: '2020', to: 'present', owner: 'You',                  where: 'Carmel, CA',   note: 'Body-off restoration commissioned 2023', kind: 'self', current: true },
    { from: '1989', to: '2020',    owner: 'Heritage Motorworks',  where: 'Stuttgart, DE', note: 'Long-term dry storage · unrestored',    kind: 'collection' },
    { from: '1961', to: '1989',    owner: 'Dr. Ludwig Vogel',     where: 'Zürich, CH',   note: 'Touring & alpine rallies',              kind: 'private' },
    { from: '1955', to: '1961',    owner: 'Maximilian Hoffman (import)', where: 'New York, NY', note: 'US-delivery via Hoffman Motors', kind: 'private' },
    { from: '1955', to: '1955',    owner: 'Daimler-Benz AG',      where: 'Sindelfingen, DE', note: 'Alloy-body order · Silver Grey',    kind: 'factory' },
  ],

  provenance: {
    matchingVin: true,
    originalEngine: true,
    originalTrans: true,
    awards: [
      { event: 'Amelia Island Concours', placement: 'Class entrant', year: 2019 },
      { event: 'Hoffman Tribute Display', placement: 'Featured',      year: 2021 },
    ],
    significance: [
      'Rare alloy-bodied 300 SL — 29 built',
      'Documented Maximilian Hoffman US delivery',
      'Original engine, gearbox and data card present',
    ],
    docs: ['Mercedes-Benz data card', 'Build records', "Owner's manual", 'Restoration dossier (live)', 'Period photography'],
  },

  // Timeline
  timeline: [
    { date: 'Sep 18, 2024', type: 'Restoration', title: 'Engine reunited with chassis',
      mileage: 34512, vendor: 'Rudi & Company', cost: 18_400,
      note: 'M198 test-run on stand · timing verified', attachments: 5 },
    { date: 'May 6, 2024',  type: 'Restoration', title: 'Bare-metal media blast complete',
      mileage: 34512, vendor: 'Rudi & Company', cost: 22_600,
      note: 'Body straight · minimal filler · ready for primer', attachments: 7 },
    { date: 'Mar 2, 2024',  type: 'Transport',   title: 'Delivered to restoration shop',
      mileage: 34512, vendor: 'Intercity Lines', cost: 1_980,
      note: 'Enclosed transport · Carmel → Costa Mesa', attachments: 1 },
    { date: 'Nov 20, 2023', type: 'Restoration', title: 'Engine rebuild — M198',
      mileage: 34510, vendor: 'Metric Motors', cost: 64_000,
      note: 'Alloy block · injection pump rebuilt by Gus', attachments: 6 },
    { date: 'Aug 14, 2021', type: 'Appraisal',   title: 'Insurance appraisal',
      mileage: 34480, vendor: 'Hagerty', cost: null,
      note: 'Agreed value $1,360,000 USD', attachments: 1 },
    { date: 'Jun 27, 2020', type: 'Acquisition', title: 'Purchased — Bonhams Scottsdale',
      mileage: 34470, vendor: 'Bonhams', cost: 1_300_000,
      note: 'Acquired from Heritage Motorworks', attachments: 9 },
  ],

  // Service
  service: [
    { date: 'Sep 2024', item: 'Restoration progress invoice', mileage: 34512, vendor: 'Rudi & Company', cost: 41_000, next: 'Nov 2024' },
    { date: 'Nov 2023', item: 'Engine rebuild',               mileage: 34510, vendor: 'Metric Motors',  cost: 64_000, next: '—' },
    { date: 'Apr 2021', item: 'Recommissioning service',      mileage: 34485, vendor: 'Rudi & Company', cost: 7_800,  next: '—' },
    { date: 'Aug 2020', item: 'Intake inspection',            mileage: 34472, vendor: 'Rudi & Company', cost: 1_200,  next: '—' },
  ],

  // Parts
  parts: [
    { name: 'Rudge knock-off wheels',  spec: 'Alloy · set of 5',     type: 'OEM-NOS', installed: 'Pending', supplier: 'SL Shop',       warranty: '—',    cost: 28_000 },
    { name: 'Mechanical injection pump', spec: 'Bosch · rebuilt',    type: 'OEM',     installed: '2023',    supplier: 'Gus Pfister',   warranty: '—',    cost: 8_600 },
    { name: 'Red plaid upholstery set', spec: 'Correct pattern',     type: 'OEM-spec',installed: 'Pending', supplier: 'GAHH',          warranty: '—',    cost: 12_400 },
    { name: 'Stainless exhaust system', spec: 'Correct-pattern',     type: 'OEM-spec',installed: '2024',    supplier: 'Fabspeed',      warranty: '2029', cost: 3_900 },
  ],

  // Documents
  documents: [
    { category: 'Provenance', items: [
      { name: 'Mercedes-Benz data card', date: '1955',     kind: 'pdf',   pages: 2,  archival: true },
      { name: 'Build records',           date: '1955',     kind: 'pdf',   pages: 6,  archival: true },
      { name: 'Period photography',      date: '1955–1989', kind: 'image', pages: 24, archival: true },
    ]},
    { category: 'Restoration', items: [
      { name: 'Restoration dossier (live)', date: '2023–', kind: 'pdf',   pages: 58 },
      { name: 'Body & paint photo set',     date: '2024',  kind: 'image', pages: 180 },
      { name: 'Engine rebuild report',      date: '2023',  kind: 'pdf',   pages: 22 },
    ]},
    { category: 'Registration', items: [
      { name: 'CA Title',         date: 'Jul 2020', kind: 'pdf', pages: 1 },
      { name: 'CA Registration',  date: 'Jul 2024', kind: 'pdf', pages: 1, expires: 'Jul 2025' },
    ]},
    { category: 'Insurance', items: [
      { name: 'Hagerty agreed-value policy', date: 'Aug 2024', kind: 'pdf', pages: 8, expires: 'Aug 2025' },
    ]},
    { category: 'Acquisition', items: [
      { name: 'Bonhams invoice',        date: 'Jun 2020', kind: 'pdf', pages: 2 },
      { name: 'Pre-purchase inspection', date: 'May 2020', kind: 'pdf', pages: 18 },
    ]},
  ],
};

Object.assign(window, { VEHICLE_MERCEDES });
