/* Sentosa Marketplace - Seller Portal sample data */

const SELLER_PRODUCTS = [
  { id: "SKU-1042", name: "Cable Car Sky Pass", type: "Ticket", trade: 32.0, rack: 40.0, stock: 1840, allot: 2500, status: "Live", sales7: 412 },
  { id: "SKU-1043", name: "Cable Car + Luge Combo", type: "Package", trade: 48.5, rack: 62.0, stock: 920, allot: 1500, status: "Live", sales7: 286 },
  { id: "SKU-1051", name: "Sky Dining Experience", type: "Experience", trade: 128.0, rack: 158.0, stock: 64, allot: 400, status: "Low stock", sales7: 38 },
  { id: "SKU-1077", name: "Cable Car Night Pass", type: "Ticket", trade: 36.0, rack: 45.0, stock: 0, allot: 800, status: "Sold out", sales7: 0 },
  { id: "SKU-1080", name: "Group Charter (20 pax)", type: "Charter", trade: 540.0, rack: 660.0, stock: 12, allot: 40, status: "Live", sales7: 6 },
  { id: "SKU-1099", name: "Festive Season Pass", type: "Ticket", trade: 42.0, rack: 52.0, stock: 500, allot: 500, status: "Draft", sales7: 0 },
  { id: "SKU-1104", name: "Sunset Cabin - Private", type: "Experience", trade: 288.0, rack: 348.0, stock: 24, allot: 60, status: "In review", sales7: 0 },
];

const RECENT_ORDERS = [
  { ref: "SDC-00482", buyer: "Wanderlust Travel", items: 3, total: 1240.0, status: "Confirmed", date: "Today, 14:22" },
  { ref: "SDC-00481", buyer: "Asia OTA Group", items: 1, total: 320.0, status: "Confirmed", date: "Today, 11:08" },
  { ref: "SDC-00478", buyer: "MICE Connect SG", items: 8, total: 4350.0, status: "Processing", date: "Yesterday, 17:44" },
  { ref: "SDC-00475", buyer: "Island Hoppers", items: 2, total: 96.0, status: "Refunded", date: "Yesterday, 09:30" },
];

const SALES_BARS = [["Mon", 62], ["Tue", 78], ["Wed", 54], ["Thu", 90], ["Fri", 100], ["Sat", 84], ["Sun", 71]];

/* Orders with fulfilment detail (S/No. 3, 4) */
const ORDERS = [
  { ref: "SDC-00482", buyer: "Wanderlust Travel Pte Ltd", contact: "bookings@wanderlust.com", placed: "Today, 14:22",
    travel: "14 Aug 2026", total: 1240.0, status: "Confirmed", method: "PayNow", issued: 40, redeemed: 0,
    lines: [{ sku: "SKU-1042", name: "Cable Car Sky Pass", qty: 40, unit: 31.0 }] },
  { ref: "SDC-00481", buyer: "Asia OTA Group", contact: "ops@asiaota.com", placed: "Today, 11:08",
    travel: "22 Aug 2026", total: 320.0, status: "Confirmed", method: "Credit card", issued: 10, redeemed: 4,
    lines: [{ sku: "SKU-1042", name: "Cable Car Sky Pass", qty: 10, unit: 32.0 }] },
  { ref: "SDC-00478", buyer: "MICE Connect SG", contact: "events@miceconnect.sg", placed: "Yesterday, 17:44",
    travel: "3 Sep 2026", total: 4350.0, status: "Processing", method: "Bank transfer", issued: 0, redeemed: 0,
    lines: [{ sku: "SKU-1043", name: "Cable Car + Luge Combo", qty: 60, unit: 48.5 },
            { sku: "SKU-1051", name: "Sky Dining Experience", qty: 11, unit: 128.0 }] },
  { ref: "SDC-00475", buyer: "Island Hoppers", contact: "hello@islandhoppers.sg", placed: "Yesterday, 09:30",
    travel: "18 Jul 2026", total: 96.0, status: "Refunded", method: "eWallet", issued: 3, redeemed: 0,
    lines: [{ sku: "SKU-1042", name: "Cable Car Sky Pass", qty: 3, unit: 32.0 }] },
];

/* Promotions - partner may request; SDC admin approves centrally (Reply 4 Q13) */
const SELLER_PROMOS = [
  { ref: "PRM-2041", name: "Early-bird September", mech: "Percentage", value: "12%", scope: "Cable Car Sky Pass", period: "1-30 Sep 2026", status: "Approved" },
  { ref: "PRM-2038", name: "Combo bundle saver", mech: "Bundle", value: "S$6 off", scope: "Cable Car + Luge Combo", period: "15 Aug - 15 Sep 2026", status: "Pending SDC approval" },
  { ref: "PRM-2030", name: "Card-linked weekend offer", mech: "Card-based", value: "8%", scope: "All products", period: "Weekends, Aug 2026", status: "Rejected" },
];

/* Reports available to the partner (S/No. 105, 107) */
const SELLER_REPORTS = [
  { name: "Product performance report", sno: "107", desc: "Sales, conversion and revenue by SKU across a selected period." },
  { name: "eTicket tracking report", sno: "105", desc: "Issuance, redemption and expiry status for every ticket sold." },
  { name: "Inventory status report", sno: "104", desc: "Allotment, remaining stock and low-stock exposure by product." },
  { name: "Settlement summary", sno: "-", desc: "Settlement rates and amounts payable by SDC for the period." },
];

const PRODUCT_PERF = [
  { name: "Cable Car Sky Pass", units: 412, revenue: 13184, conv: 5.2, trend: 12.4 },
  { name: "Cable Car + Luge Combo", units: 286, revenue: 13871, conv: 4.6, trend: 8.1 },
  { name: "Sky Dining Experience", units: 38, revenue: 4864, conv: 2.1, trend: -3.4 },
  { name: "Group Charter (20 pax)", units: 6, revenue: 3240, conv: 1.4, trend: 2.0 },
];

Object.assign(window, { SELLER_PRODUCTS, RECENT_ORDERS, SALES_BARS, ORDERS, SELLER_PROMOS, SELLER_REPORTS, PRODUCT_PERF });
