// data.jsx — mock dataset for Credo, exported to window.CREDO
// Property image placeholders are CSS-rendered (labelled), so each carries a hue + label.

const PROPERTIES = [
  {
    id: 'p1', ref: 'CR-1042', title: 'Ashby Lofts, Apartment 14B',
    type: 'Residential', sub: 'Apartment', city: 'Shoreditch', country: 'London, UK',
    price: 3450, cur: '£', unit: '/mo', beds: 2, baths: 2, area: 1180, areaUnit: 'sq ft',
    hue: 158, label: 'apartment exterior', tag: 'Featured', listed: 'Apr 2026',
    blurb: 'A light-filled corner residence with full-height glazing, oak floors and a private terrace overlooking the canal.',
    features: ['Concierge', 'Private terrace', 'Underfloor heating', 'Secure parking', 'Gym & spa', 'EV charging'],
  },
  {
    id: 'p2', ref: 'CR-1056', title: 'Northgate Commercial Suite',
    type: 'Commercial', sub: 'Office', city: 'Spinningfields', country: 'Manchester, UK',
    price: 24800, cur: '£', unit: '/yr', beds: 0, baths: 2, area: 4200, areaUnit: 'sq ft',
    hue: 200, label: 'office floor', tag: 'New', listed: 'May 2026',
    blurb: 'Grade-A open-plan office floor with river views, raised access flooring and 24/7 building access.',
    features: ['Open plan', 'Meeting suites', '24/7 access', 'Fibre ready', 'Bike storage', 'Roof terrace'],
  },
  {
    id: 'p3', ref: 'CR-1071', title: 'Brookmere Plot, 2.4 acres',
    type: 'Land', sub: 'Plot', city: 'Cotswolds', country: 'Gloucestershire, UK',
    price: 615000, cur: '£', unit: '', beds: 0, baths: 0, area: 104544, areaUnit: 'sq ft',
    hue: 96, label: 'aerial of land plot', tag: 'Planning granted', listed: 'Mar 2026',
    blurb: 'Elevated residential development plot with outline planning for four detached dwellings and mature woodland border.',
    features: ['Outline planning', 'Road access', 'Services nearby', 'AONB views', 'Woodland border'],
  },
  {
    id: 'p4', ref: 'CR-1088', title: 'Alfama Terrace House',
    type: 'Short-let', sub: 'Vacation', city: 'Alfama', country: 'Lisbon, Portugal',
    price: 210, cur: '€', unit: '/night', beds: 3, baths: 2, area: 1450, areaUnit: 'sq ft',
    hue: 32, label: 'terraced townhouse', tag: 'High demand', listed: 'Feb 2026',
    blurb: 'Restored 19th-century townhouse with azulejo tiling, a roof terrace and sweeping views across the Tagus.',
    features: ['Roof terrace', 'River view', 'Air conditioning', 'Self check-in', 'Weekly cleaning'],
  },
  {
    id: 'p5', ref: 'CR-1094', title: 'Mitte Quarter — Phase II',
    type: 'Development', sub: 'Project', city: 'Mitte', country: 'Berlin, Germany',
    price: 4200000, cur: '€', unit: '', beds: 0, baths: 0, area: 38000, areaUnit: 'sq ft',
    hue: 268, label: 'development render', tag: 'Off-plan', listed: 'Jan 2026',
    blurb: 'Mixed-use development of 48 apartments and ground-floor retail, completing Q4 2027. Investment units available.',
    features: ['48 units', 'Retail ground floor', 'BREEAM Excellent', 'Q4 2027', 'Investor pack'],
  },
  {
    id: 'p6', ref: 'CR-1101', title: 'Dean Village Townhouse',
    type: 'Residential', sub: 'House', city: 'Dean Village', country: 'Edinburgh, UK',
    price: 5200, cur: '£', unit: '/mo', beds: 4, baths: 3, area: 2650, areaUnit: 'sq ft',
    hue: 142, label: 'stone townhouse', tag: 'Featured', listed: 'Apr 2026',
    blurb: 'Georgian stone townhouse over four floors with a walled garden, period detailing and a converted studio.',
    features: ['Walled garden', 'Period features', 'Garden studio', 'Off-street parking', 'Furnished option'],
  },
  {
    id: 'p7', ref: 'CR-1115', title: 'Keizersgracht Retail Unit',
    type: 'Commercial', sub: 'Retail', city: 'Grachtengordel', country: 'Amsterdam, NL',
    price: 78000, cur: '€', unit: '/yr', beds: 0, baths: 1, area: 1900, areaUnit: 'sq ft',
    hue: 18, label: 'canal-side storefront', tag: 'New', listed: 'May 2026',
    blurb: 'Double-fronted canal-side retail unit in a protected façade building, ideal for flagship or hospitality use.',
    features: ['Double frontage', 'Canal-side', 'A1/A3 use', 'Cellar storage', 'High footfall'],
  },
  {
    id: 'p8', ref: 'CR-1123', title: 'Le Marais Pied-à-terre',
    type: 'Short-let', sub: 'Vacation', city: 'Le Marais', country: 'Paris, France',
    price: 320, cur: '€', unit: '/night', beds: 1, baths: 1, area: 720, areaUnit: 'sq ft',
    hue: 340, label: 'parisian apartment', tag: 'High demand', listed: 'Mar 2026',
    blurb: 'Refined one-bedroom apartment with parquet floors, a marble fireplace and classic Haussmann proportions.',
    features: ['Haussmann building', 'Marble fireplace', 'Lift access', 'Concierge', 'Self check-in'],
  },
];

// users who have engaged with the platform (admin view)
const USERS = [
  { id: 'u1', name: 'Eleanor Whitmore', email: 'e.whitmore@gmail.com', joined: '2026-04-02', verified: true,  saved: 4, requests: 2, status: 'Active',  last: '2h ago' },
  { id: 'u2', name: 'Tomas Lindqvist',  email: 'tomas.l@protonmail.com', joined: '2026-04-11', verified: true,  saved: 7, requests: 3, status: 'Active',  last: 'Today' },
  { id: 'u3', name: 'Priya Nadkarni',   email: 'priya.nadkarni@outlook.com', joined: '2026-05-01', verified: true,  saved: 2, requests: 1, status: 'Active',  last: 'Yesterday' },
  { id: 'u4', name: 'Marc Devereux',    email: 'm.devereux@orange.fr', joined: '2026-05-09', verified: false, saved: 1, requests: 0, status: 'Pending', last: '5d ago' },
  { id: 'u5', name: 'Sofia Almeida',    email: 'sofia.almeida@sapo.pt', joined: '2026-05-14', verified: true,  saved: 5, requests: 2, status: 'Active',  last: '3h ago' },
  { id: 'u6', name: 'James Okonkwo',    email: 'jokonkwo@gmail.com', joined: '2026-05-22', verified: true,  saved: 3, requests: 1, status: 'Active',  last: '1d ago' },
  { id: 'u7', name: 'Hannah Reuben',    email: 'hannah.reuben@gmx.de', joined: '2026-05-30', verified: false, saved: 0, requests: 0, status: 'Pending', last: '6d ago' },
];

// requests routed to admin (inspection + lease)
const REQUESTS = [
  { id: 'r1', kind: 'Inspection', ref: 'INS-2041', propId: 'p1', user: 'Eleanor Whitmore', userId: 'u1', date: '2026-06-18', slot: '11:00', status: 'Approved',  created: '2026-06-10', note: 'Prefer a morning viewing; interested in the terrace and parking.' },
  { id: 'r2', kind: 'Lease',      ref: 'LSE-3088', propId: 'p6', user: 'Tomas Lindqvist',  userId: 'u2', date: '2026-07-01', slot: '—',     status: 'In review', created: '2026-06-12', note: '12-month lease, furnished. Two professional tenants, no pets.' },
  { id: 'r3', kind: 'Inspection', ref: 'INS-2052', propId: 'p2', user: 'Priya Nadkarni',   userId: 'u3', date: '2026-06-20', slot: '15:30', status: 'Pending',   created: '2026-06-13', note: 'Reviewing for a 14-desk team; need to see meeting suites.' },
  { id: 'r4', kind: 'Inspection', ref: 'INS-2055', propId: 'p4', user: 'Sofia Almeida',    userId: 'u5', date: '2026-06-22', slot: '10:00', status: 'Scheduled', created: '2026-06-13', note: 'Family stay in August — checking roof terrace and bedrooms.' },
  { id: 'r5', kind: 'Lease',      ref: 'LSE-3091', propId: 'p7', user: 'James Okonkwo',    userId: 'u6', date: '2026-07-15', slot: '—',     status: 'Pending',   created: '2026-06-14', note: 'Flagship retail use; querying A3 hospitality consent.' },
  { id: 'r6', kind: 'Inspection', ref: 'INS-2058', propId: 'p8', user: 'Sofia Almeida',    userId: 'u5', date: '2026-06-25', slot: '14:00', status: 'Completed', created: '2026-06-05', note: 'Viewing complete — awaiting decision on dates.' },
];

const STATUS_FLOW = ['Pending', 'In review', 'Approved', 'Scheduled', 'Completed'];

// messaging thread (static mock between current user and Credeo admin)
const THREAD = [
  { from: 'admin', name: 'Credeo Concierge', text: 'Hello — thanks for your interest in Ashby Lofts 14B. I can arrange your viewing this week.', time: 'Mon 09:12' },
  { from: 'user',  name: 'You', text: 'Wonderful. Would Thursday morning work? I would love to see the terrace.', time: 'Mon 09:31' },
  { from: 'admin', name: 'Credeo Concierge', text: 'Thursday 18 June at 11:00 is available. I have pencilled it in and the owner is happy to show the parking and gym too.', time: 'Mon 09:40' },
  { from: 'user',  name: 'You', text: 'Perfect, please confirm. Is the terrace furniture included in the let?', time: 'Mon 10:02' },
  { from: 'admin', name: 'Credeo Concierge', text: 'Confirmed ✓ Your inspection INS-2041 is approved for Thu 18 Jun, 11:00. The terrace furniture stays with the property. See you then.', time: 'Mon 10:08', meta: 'inspection-approved' },
];

const ACTIVITY = [
  { who: 'Tomas Lindqvist', act: 'submitted a lease request', obj: 'Dean Village Townhouse', time: '14m ago', kind: 'Lease' },
  { who: 'Priya Nadkarni', act: 'requested an inspection', obj: 'Northgate Commercial Suite', time: '1h ago', kind: 'Inspection' },
  { who: 'Sofia Almeida', act: 'saved', obj: 'Le Marais Pied-à-terre', time: '3h ago', kind: 'Save' },
  { who: 'James Okonkwo', act: 'sent a message about', obj: 'Keizersgracht Retail Unit', time: '4h ago', kind: 'Message' },
  { who: 'Eleanor Whitmore', act: 'verified their email', obj: '', time: '6h ago', kind: 'Verify' },
];

window.CREDO = { PROPERTIES, USERS, REQUESTS, STATUS_FLOW, THREAD, ACTIVITY };
