// ────────────────────────────────────────────────────────────────────
// AW-024 · Channel Contract Create — wizard data + variants
// ────────────────────────────────────────────────────────────────────

const CHN_CREATE_VARIANTS = {
  // 1 · Step 1 default — partial fill, valid
  step1: {
    step: 0,
    contract: {
      company: 'Hana Members Care',
      manager: '서지훈',
      email: 'jihoon.suh@hanafn.com',
      phone: '+82-2-2002-1180',
      bizNo: '202-81-44091',
      startDate: '2026-05-03',
      endDate: '2027-05-02',
      industry: '금융',
      scale: 'large',  // > 1000명
    },
    payment: { method: null, bank: null, account: '', holder: '', taxEmail: '' },
    issue: { product: null, qty: '', expiryDate: '', usageHours: '', perUserMax: '' },
    errors: {},
  },

  // 2 · ERR-019 (dup company) + ERR-003 (email format) — Step 1
  err19email: {
    step: 0,
    contract: {
      company: 'TravelMate Korea',     // already exists
      manager: '윤서영',
      email: 'seoyoung.yoon@travelmate',  // missing TLD
      phone: '+82-2-3445-1820',
      bizNo: '110-86-22019',
      startDate: '2026-05-03',
      endDate: '2027-05-02',
      industry: '여행',
      scale: 'large',
    },
    payment: {},
    issue: {},
    errors: { company: 'ERR-019', email: 'ERR-003' },
  },

  // 3 · Step 2 — ERR-020 (account info invalid for 계좌이체)
  err20: {
    step: 1,
    contract: {
      company: 'Hana Members Care',
      manager: '서지훈',
      email: 'jihoon.suh@hanafn.com',
      phone: '+82-2-2002-1180',
      bizNo: '202-81-44091',
      startDate: '2026-05-03',
      endDate: '2027-05-02',
      industry: '금융',
      scale: 'large',
    },
    payment: {
      method: 'transfer',
      bank: 'shinhan',
      account: '110-***',           // incomplete
      holder: '',                   // missing
      taxEmail: 'finance@hanafn.com',
    },
    issue: {},
    errors: { account: 'ERR-020', holder: 'required' },
  },

  // 4 · Step 3 — ready to submit (all complete)
  step3: {
    step: 2,
    contract: {
      company: 'Hana Members Care',
      manager: '서지훈',
      email: 'jihoon.suh@hanafn.com',
      phone: '+82-2-2002-1180',
      bizNo: '202-81-44091',
      startDate: '2026-05-03',
      endDate: '2027-05-02',
      industry: '금융',
      scale: 'large',
    },
    payment: {
      method: 'transfer',
      bank: 'shinhan',
      account: '110-441-228810',
      holder: '주식회사 하나금융지주',
      taxEmail: 'finance@hanafn.com',
    },
    issue: {
      product: 'INT-2026-0028',
      productName: 'Premium Wellness PASS · 5D',
      qty: 5000,
      expiryDate: '2027-05-02',
      usageHours: 120,
      perUserMax: 1,
    },
    errors: {},
  },
};

// Reference data
const PAYMENT_METHODS = [
  { id: 'transfer',  label: '계좌 이체',   hint: '월 정산 후 송금' },
  { id: 'card',      label: '법인카드',    hint: '카드사 자동 결제' },
  { id: 'prepay',    label: '선결제',      hint: '계약 시 일괄 결제' },
  { id: 'postpay',   label: '후정산',      hint: '사용량 기반 월말 정산' },
];

const BANKS = [
  { id: 'shinhan', label: '신한은행' },
  { id: 'kookmin', label: '국민은행' },
  { id: 'woori',   label: '우리은행' },
  { id: 'hana',    label: '하나은행' },
  { id: 'ibk',     label: '기업은행' },
  { id: 'nh',      label: '농협은행' },
];

const INDUSTRIES = ['여행', '항공', '금융', '리테일', '복지', '호텔', '통신', '엔터'];

const SCALES = [
  { id: 'sm', label: '~ 100명',     hint: '소형' },
  { id: 'md', label: '100 ~ 1,000명', hint: '중형' },
  { id: 'large', label: '1,000명 ~',  hint: '대형 / 엔터프라이즈' },
];

// Integrated products (slice from AW-012)
const INT_PRODUCTS = [
  { id: 'INT-2026-0028', name: 'Premium Wellness PASS · 5D',  cat: 'Health',  price: '₩ 286 / PASS' },
  { id: 'INT-2026-0017', name: 'City Healing Combo · 3D',       cat: 'Wellness', price: '₩ 198 / PASS' },
  { id: 'INT-2026-0022', name: 'Family Care PASS · 7D',         cat: 'Health',  price: '₩ 412 / PASS' },
  { id: 'INT-2025-0099', name: 'Executive Renewal · 10D',       cat: 'Premium', price: '₩ 980 / PASS' },
];

Object.assign(window, {
  CHN_CREATE_VARIANTS, PAYMENT_METHODS, BANKS, INDUSTRIES, SCALES, INT_PRODUCTS,
});
