// TownPost — shared content data for the city of Quinte West
// Realistic, neighborly, mixed in tone

const CITY = {
  name: 'Quinte West',
  motto: 'Where neighbors live louder',
  population: '90,000',
};

const NEIGHBORHOODS = ['Old Mill', 'Riverside', 'Eastgate Heights', 'Maple Park', 'The Grove', 'South Hollow', 'Linden Square'];

const FEED = [
  {
    id: 1, kind: 'rich', author: 'Marisol Hayes', hue: 1, neighborhood: 'Old Mill', time: '9m',
    rating: 4.9, helpful: 124, verified: true, trending: true,
    text: 'After 12 years of searching: the croissants at @PelhamStBakery are finally as good as the ones I grew up with in #Lyon. Get there before 9am or you\'ll cry. (Located at #OldMill)',
    image: 'photo · pelham st. bakery',
    images: [
      { label: 'pelham st. bakery', hue: 0 },
      { label: 'croissant — flake detail', hue: 2 },
      { label: 'morning queue 8:50am', hue: 4 },
    ],
    stats: { replies: 47, shares: 12, likes: 184 },
  },
  {
    id: 2, kind: 'compact', author: 'Marcus Boon', hue: 0, neighborhood: 'Riverside', time: '14m',
    rating: 4.7, helpful: 38,
    text: 'Has anyone seen a small grey cat near the Riverside footbridge? Goes by Pickle. Microchipped. He bolted out the window during the storm last night and we are losing our minds. #LostPet @QuintePetRescue',
    stats: { replies: 23, shares: 38, likes: 67 },
  },
  {
    id: 3, kind: 'news', author: 'The Quinte West Daily', hue: 3, neighborhood: 'City Hall', time: '32m',
    rating: 4.8, helpful: 412, verified: true, official: true, trending: true,
    title: 'City Council approves Linden Square redesign — fountain stays',
    subtitle: 'After 14 months of public hearings, the 4–3 vote preserves the 1923 fountain but reroutes traffic.',
    image: 'photo · linden sq. fountain',
    stats: { replies: 156, shares: 89, likes: 412 },
  },
  {
    id: 4, kind: 'compact', author: 'Dev Krishnan', hue: 2, neighborhood: 'Belleville & Area', time: '47m',
    rating: 4.6, helpful: 8,
    text: 'New to Eastgate. Looking for a no-nonsense plumber who shows up when they say they will. Any recommendations? Bonus points for someone who works on old houses. #PlumberRec',
    stats: { replies: 31, shares: 4, likes: 18 },
  },
  {
    id: 6, kind: 'compact', author: 'Coach Reggie', hue: 6, neighborhood: 'Maple Park', time: '2h',
    rating: 4.9, helpful: 67, verified: true,
    text: 'PSA: the @MaplePark rec league is short two refs for the Saturday 10am U12 games. Comp\'d coffee at the snack shack and the eternal gratitude of every parent on the sideline. #Volunteer',
    stats: { replies: 11, shares: 22, likes: 41 },
  },
  {
    id: 7, kind: 'rich', author: 'Quinte West Parks Dept.', hue: 0, neighborhood: 'Citywide', time: '3h',
    rating: 5.0, helpful: 233, verified: true, official: true, trending: true,
    text: 'Free tree giveaway this Saturday at the @OldMill depot — 8am to noon, while supplies last. Saplings include river birch, sugar maple, and serviceberry. Bring a bucket. #FreeTrees #ClimateAction',
    image: 'photo · saplings',
    stats: { replies: 19, shares: 67, likes: 233 },
  },
  {
    id: 8, kind: 'compact', author: 'Theo Park', hue: 7, neighborhood: 'South Hollow', time: '4h',
    rating: 4.8, helpful: 92, trending: true,
    text: 'The peregrine falcon nest on the @3rdAveWaterTower has TWO chicks this year. They were doing flying lessons this morning. Stand on the corner of #3rdAndBeckett at sunrise, you will not regret it. 🦅',
    stats: { replies: 14, shares: 19, likes: 156 },
  },
];

const ALERTS = [
  {
    id: 1, tone: 'red', icon: 'alert', time: '4 min ago',
    title: 'Water main break — Beckett Ave between 3rd and 7th',
    body: 'Crews on scene. Expect low pressure or temporary outage in Old Mill west of the river. Estimated repair: 4–6 hrs. Boil-water advisory NOT in effect.',
    area: 'Old Mill', source: 'Quinte West Public Works', views: '3.4k',
    stage: 'verified', official: true,
  },
  {
    id: 2, tone: 'amber', icon: 'car', time: '22 min ago',
    title: 'Tree down across Linden Pkwy at the school crossing',
    body: 'Eastbound lane blocked. Use Maple St as detour. Crew dispatched. School crossing guard relocated to Maple/4th for afternoon dismissal.',
    area: 'Linden Square', source: 'Neighbor: J. Ortiz', views: '1.1k',
    stage: 'confirmed', confirms: 7, cantConfirm: 1, affected: 23,
    reporterRep: { posts: 12, verified: 9 },
    distance: '0.4 mi away',
  },
  {
    id: 3, tone: 'blue', icon: 'cloud', time: '1 hr ago',
    title: 'Severe thunderstorm watch until 9pm',
    body: 'NWS has issued a watch for the entire metro area. Possible damaging winds and quarter-size hail. Take in patio furniture; charge devices.',
    area: 'Citywide', source: 'NWS Quinte West', views: '12k',
  },
  {
    id: 4, tone: 'forest', icon: 'leaf', time: '3 hrs ago',
    title: 'Air quality moderate — sensitive groups should limit outdoor activity',
    body: 'Wildfire smoke from north county pushing AQI to 112. Likely improvement overnight as winds shift west.',
    area: 'Citywide', source: 'AirNow', views: '4.7k',
  },
  {
    id: 5, tone: 'amber', icon: 'briefcase', time: '5 hrs ago',
    title: 'Power planned outage — Tuesday 1am–4am',
    body: 'Quinte West Electric will cut service to ~340 homes south of the river for transformer replacement. SMS reminder will go out 1 hour prior.',
    area: 'South Hollow', source: 'Quinte West Electric', views: '890',
  },
];

const EVENTS = [
  { id: 1, day: 'TUE', date: '29', title: 'Farmers Market', loc: 'Linden Square', time: '4–8 PM', going: 142, hue: 1 },
  { id: 2, day: 'WED', date: '30', title: 'Council meeting: Park budget', loc: 'City Hall, Rm 204', time: '7 PM', going: 38, hue: 3 },
  { id: 3, day: 'SAT', date: '03', title: 'Riverside cleanup', loc: 'Riverside footbridge', time: '9 AM', going: 67, hue: 5 },
  { id: 4, day: 'SAT', date: '03', title: 'Old Mill jazz under the trees', loc: 'Old Mill Park', time: '6 PM', going: 211, hue: 1 },
  { id: 5, day: 'SUN', date: '04', title: 'Pickle ball mixer · all levels', loc: 'Maple Park courts', time: '10 AM', going: 24, hue: 4 },
];

const MARKET = [
  { id: 1, title: 'Walnut credenza · MCM', price: '$340', loc: 'The Grove', time: '1h', hue: 0, cat: 'Furniture',
    cond: 'Excellent', photos: 5, desc: 'Solid walnut, mid-century, six soft-close drawers. We\'re downsizing and don\'t have the space anymore. Bought in 2019 from a vintage shop in Toronto. One small scratch on the left side near the back, otherwise immaculate.',
    dims: '60" W × 18" D × 32" H', delivery: 'Pickup only · The Grove',
    seller: { name: 'Marisol Hernández', hue: 1, joined: 'Member since 2022', rating: 4.9, sales: 23, verified: true } },
  { id: 2, title: 'Like-new Bugaboo stroller', price: '$220', loc: 'Eastgate', time: '3h', hue: 1, cat: 'Kids',
    cond: 'Like new', photos: 4, desc: 'Bugaboo Fox 3 — used for one kid, mostly weekend walks. Comes with bassinet, sunshade, and rain cover. Wheels and brakes are perfect. Original retail $1,400.',
    dims: '36 lb · folds flat', delivery: 'Pickup or local delivery ($15)',
    seller: { name: 'Priya Naidu', hue: 1, joined: 'Member since 2021', rating: 5.0, sales: 8, verified: true } },
  { id: 3, title: 'Vintage Trek road bike, 56cm', price: '$185', loc: 'Old Mill', time: '5h', hue: 2, cat: 'Bikes',
    cond: 'Good · serviced', photos: 6, desc: '1989 Trek 1200 in original red. Shimano 105 group, recently tuned at Quinte Bike Co. — new chain, cassette, and bar tape. Steel frame, light surface scratches. A great commuter or first road bike.',
    dims: '56cm frame · steel', delivery: 'Pickup · Old Mill area',
    seller: { name: 'Renee Okonkwo', hue: 4, joined: 'Member since 2020', rating: 4.8, sales: 41, verified: true } },
  { id: 4, title: 'Le Creuset 7qt — chartreuse', price: '$120', loc: 'Riverside', time: '6h', hue: 3, cat: 'Home',
    cond: 'Used · 5 yrs', photos: 3, desc: 'Round Dutch oven, 7.25qt. Some normal use marks on the bottom but no chips or major staining. Lid is perfect. Discontinued color.',
    dims: '7.25 qt', delivery: 'Pickup',
    seller: { name: 'Ben Tomlinson', hue: 0, joined: 'Member since 2023', rating: 4.7, sales: 12, verified: false } },
  { id: 5, title: 'Plant trade · pothos cuttings', price: 'FREE', loc: 'Maple Park', time: '8h', hue: 4, cat: 'Plants',
    cond: 'Healthy', photos: 2, desc: 'I have about 8 rooted golden pothos cuttings looking for homes. Free if you bring a small cutting of something else to swap. Porch pickup any afternoon this week.',
    dims: '4-6" cuttings · rooted', delivery: 'Porch pickup',
    seller: { name: 'Sarah Chen', hue: 2, joined: 'Member since 2024', rating: 5.0, sales: 6, verified: true } },
  { id: 6, title: 'Drum kit · Tama 5pc', price: '$520', loc: 'South Hollow', time: '11h', hue: 5, cat: 'Music',
    cond: 'Good', photos: 7, desc: 'Tama Imperialstar 5-piece in midnight blue. Includes hardware, hi-hat, crash, and ride. Heads are about a year old. Great starter or practice kit. My son has moved on to guitar.',
    dims: '22" kick · 12/13/16 toms', delivery: 'Pickup only',
    seller: { name: 'David Park', hue: 3, joined: 'Member since 2022', rating: 4.6, sales: 9, verified: false } },
  { id: 7, title: 'Wedding dress, size 8', price: '$95', loc: 'Linden Sq', time: '1d', hue: 6, cat: 'Apparel',
    cond: 'Worn once', photos: 4, desc: 'Lace A-line, ivory, size 8. Worn for one outdoor ceremony. Professionally cleaned and stored. Originally $850.',
    dims: 'Size 8 · A-line', delivery: 'Pickup or shipping',
    seller: { name: 'Lily Anderson', hue: 5, joined: 'Member since 2023', rating: 4.9, sales: 4, verified: true } },
  { id: 8, title: 'Garage door opener (works)', price: '$25', loc: 'Riverside', time: '1d', hue: 7, cat: 'Tools',
    cond: 'Used · works', photos: 2, desc: 'Chamberlain ½ HP belt drive. Replaced ours when we redid the garage. Comes with two remotes and a wall switch. Quiet and reliable.',
    dims: '½ HP · belt drive', delivery: 'Pickup',
    seller: { name: 'Curt Hollow', hue: 0, joined: 'Member since 2019', rating: 4.9, sales: 67, verified: true } },
];

const STATS = {
  newNeighbors: 14,
  postsThisWeek: 247,
  alertsResolved: 8,
  eventsNearby: 12,
};

const NOTIFS = [
  { id: 1, kind: 'reply', actor: 'Marisol Hayes', hue: 1, text: 'replied to your question about plumbers', time: '4m', preview: '"Try Curt at Hollow & Sons — he did our 1908 victorian and was honest about pricing."' },
  { id: 2, kind: 'like', actor: 'Theo Park', hue: 7, text: 'and 11 others liked your post', time: '18m' },
  { id: 3, kind: 'mention', actor: 'Coach Reggie', hue: 6, text: 'mentioned you in a comment', time: '1h', preview: '"@dev — you said you wanted to ref games this year, still in?"' },
  { id: 4, kind: 'alert', actor: 'TownPost', hue: 0, text: 'New alert near you: Tree down on Linden Pkwy', time: '2h' },
  { id: 5, kind: 'follow', actor: 'Sasha Lin', hue: 5, text: 'started following you', time: '3h' },
  { id: 6, kind: 'event', actor: 'Old Mill jazz', hue: 1, text: 'Event you saved is in 2 days', time: '4h' },
  { id: 7, kind: 'reply', actor: 'Quinte West Daily', hue: 3, text: 'replied to your comment on the Linden Square article', time: '6h' },
];

const COMMENTS = [
  { id: 1, author: 'Curt H.', hue: 0, time: '2m', views: 432, helpful: true, helpfulCount: 18, likes: 18,
    text: 'Curt at Hollow & Sons. He did our 1908 victorian and was honest about pricing — even told us when something didn\'t need fixing yet. (440) 555-0117',
    replies: [
      { id: 11, author: 'Dev Krishnan', hue: 2, time: '1m', views: 184, helpful: false, likes: 6,
        text: 'Saved his number — thank you @CurtH! Did he ever do work on cast iron drains?' },
      { id: 12, author: 'Curt H.', hue: 0, time: '40s', views: 92, helpful: false, likes: 4,
        text: '@DevKrishnan yes, he\'s rebuilt our basement stack twice. Knows old plumbing better than the YouTube guys.' },
    ],
  },
  { id: 2, author: 'Priya N.', hue: 1, time: '8m', views: 298, helpful: false, likes: 7,
    text: 'Avoid Beck\'s plumbing if you have galvanized pipes. Three different guys quoted three different things and the cheapest one ghosted us mid-job.',
    replies: [
      { id: 21, author: 'Marcus B.', hue: 0, time: '6m', views: 71, helpful: false, likes: 2,
        text: 'Same experience here. Took two weeks of follow-ups to get the invoice corrected.' },
    ],
  },
  { id: 3, author: 'Renee O.', hue: 4, time: '15m', views: 167, helpful: false, likes: 4,
    text: 'Belleville Plumbing Co. is technically not Quinte West but they will drive out for old-house jobs and they are *fast*.',
    replies: [],
  },
  { id: 4, author: 'Marisol H.', hue: 1, time: '24m', views: 521, helpful: false, likes: 22,
    text: 'Plus one for Curt. He showed up at 7am the day after we called for a burst pipe and didn\'t charge an emergency fee because, quote, "it\'s a Tuesday."',
    replies: [
      { id: 41, author: 'Theo P.', hue: 7, time: '20m', views: 88, helpful: false, likes: 3,
        text: 'A Tuesday discount is the most Quinte West thing I\'ve ever heard.' },
    ],
  },
];

Object.assign(window, { CITY, NEIGHBORHOODS, FEED, ALERTS, EVENTS, MARKET, STATS, NOTIFS, COMMENTS });
