// Mock data for the tempmail prototype

const MOCK_DOMAINS = {
  shared: [
    { id: 's1', domain: 'letstalkbout.biz', premium: true, badges: ['TOP'], favorited: true },
    { id: 's2', domain: 'mailforge.dev', premium: true, badges: ['TOP', 'HOT'], favorited: false },
    { id: 's3', domain: 'quickdrop.email', premium: false, badges: ['NEW'], favorited: true },
    { id: 's4', domain: 'duskmail.io', premium: false, badges: ['HOT'], favorited: false },
    { id: 's5', domain: 'ephemer.al', premium: true, badges: [], favorited: false },
    { id: 's6', domain: 'tmpbox.cc', premium: false, badges: ['NEW'], favorited: false },
    { id: 's7', domain: 'shadowpost.xyz', premium: false, badges: [], favorited: false },
    { id: 's8', domain: 'vanish.page', premium: false, badges: [], favorited: false },
    { id: 's9', domain: 'offthegrid.net', premium: true, badges: ['TOP'], favorited: false },
    { id: 's10', domain: 'throwaway.site', premium: false, badges: [], favorited: false },
  ],
  custom: [
    { id: 'c1', domain: 'dusk.work', premium: false, badges: [], favorited: true, status: 'verified', added: '18 Apr', count: 24 },
    { id: 'c2', domain: 'horizon67.co', premium: false, badges: [], favorited: false, status: 'pending', added: '22 Apr', count: 0 },
  ],
};

const MOCK_EMAILS = [
  {
    id: 'e1',
    from: 'OpenAI',
    fromEmail: 'team@openai.com',
    avatar: 'O',
    avatarColor: '#1a5d4e',
    subject: 'ChatGPT — Your new plan',
    preview: 'Welcome to your ChatGPT Business workspace.',
    time: '21 Apr',
    fullDate: '21/04/2026, 11:23:27',
    unread: false,
    saved: true,
    code: null,
    body: `<div style="font-family: 'Geist', system-ui, sans-serif; color: #1a1a1a; background: #fff; padding: 40px; line-height: 1.7; font-size: 15px;">
      <h1 style="font-size: 34px; margin: 0 0 28px 0; font-weight: 600; letter-spacing: -0.02em;">OpenAI</h1>
      <p style="margin: 0 0 18px 0;">dusk,</p>
      <p style="margin: 0 0 18px 0;">Welcome to your ChatGPT Business workspace.</p>
      <p style="margin: 0 0 18px 0;">Enjoy your first month free for up to 5 seats. After your first month, your subscription will renew monthly at €26 per assigned seat. You won't be billed for unassigned seats (2-seat minimum), and you can add or remove seats at any time.</p>
      <p style="margin: 0 0 18px 0;">If you have any questions, please contact us through our <a href="#" style="color: #10B981; text-decoration: underline;">help center</a>.</p>
      <p style="margin: 0 0 18px 0;">— The OpenAI team</p>
      <hr style="border: none; border-top: 1px solid #e5e5e5; margin: 36px 0;">
      <p style="color: #888; font-size: 12px; margin: 0;">OpenAI, 548 Market St, PMB 97273, San Francisco, CA 94104</p>
    </div>`,
  },
  {
    id: 'e2',
    from: 'noreply@tm.openai.com',
    fromEmail: 'noreply@tm.openai.com',
    avatar: 'N',
    avatarColor: '#7c3a0f',
    subject: 'Your temporary ChatGPT login code',
    preview: 'Your login code is 588388. It expires in 10 minutes.',
    time: '21 Apr',
    fullDate: '21/04/2026, 10:58:12',
    unread: true,
    saved: false,
    code: '588388',
    body: `<div style="font-family: 'Geist', system-ui, sans-serif; color: #1a1a1a; background: #fff; padding: 40px; line-height: 1.7; font-size: 15px;">
      <h2 style="font-size: 22px; margin: 0 0 24px 0; font-weight: 600;">Your login code</h2>
      <p style="margin: 0 0 24px 0;">Enter the code below to sign in to your ChatGPT account.</p>
      <div style="font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 700; background: #f5f5f5; padding: 20px 28px; border-radius: 8px; letter-spacing: 0.12em; display: inline-block; margin-bottom: 24px;">588388</div>
      <p style="margin: 0 0 12px 0;">This code expires in 10 minutes.</p>
      <p style="margin: 0; color: #888; font-size: 13px;">If you didn't request this, you can safely ignore this email.</p>
    </div>`,
  },
  {
    id: 'e3',
    from: 'noreply@tm.openai.com',
    fromEmail: 'noreply@tm.openai.com',
    avatar: 'N',
    avatarColor: '#7c3a0f',
    subject: 'Your ChatGPT code is 417175',
    preview: 'Your one-time code is 417175.',
    time: '21 Apr',
    fullDate: '21/04/2026, 10:41:02',
    unread: true,
    saved: false,
    code: '417175',
    body: `<div style="font-family: 'Geist', system-ui, sans-serif; color: #1a1a1a; background: #fff; padding: 40px; line-height: 1.7; font-size: 15px;">
      <h2 style="font-size: 22px; margin: 0 0 24px 0; font-weight: 600;">Your login code</h2>
      <div style="font-family: 'JetBrains Mono', monospace; font-size: 32px; font-weight: 700; background: #f5f5f5; padding: 20px 28px; border-radius: 8px; letter-spacing: 0.12em; display: inline-block; margin-bottom: 24px;">417175</div>
      <p style="margin: 0; color: #888; font-size: 13px;">Expires in 10 minutes.</p>
    </div>`,
  },
  {
    id: 'e4',
    from: 'GitHub',
    fromEmail: 'noreply@github.com',
    avatar: 'G',
    avatarColor: '#1f2937',
    subject: '[GitHub] Sign in to github.com',
    preview: 'Here is your verification code: 902841. This code will expire in 10 minutes.',
    time: '20 Apr',
    fullDate: '20/04/2026, 18:12:41',
    unread: false,
    saved: false,
    code: '902841',
    body: `<div style="font-family: -apple-system, system-ui, sans-serif; color: #1f2328; background: #fff; padding: 40px; line-height: 1.6; font-size: 14px;">
      <p style="margin: 0 0 16px 0;">Hey there,</p>
      <p style="margin: 0 0 16px 0;">Here is your verification code to sign in:</p>
      <div style="font-family: 'SFMono-Regular', Consolas, monospace; font-size: 28px; font-weight: 600; background: #f6f8fa; border: 1px solid #d1d9e0; padding: 16px 24px; border-radius: 6px; letter-spacing: 0.1em; display: inline-block; margin: 8px 0 20px 0;">902841</div>
      <p style="margin: 0 0 16px 0;">This code will expire in 10 minutes.</p>
      <p style="margin: 0;">Thanks,<br>The GitHub Team</p>
    </div>`,
  },
  {
    id: 'e5',
    from: 'Stripe',
    fromEmail: 'receipts@stripe.com',
    avatar: 'S',
    avatarColor: '#4f46e5',
    subject: 'Receipt from Vercel Inc.',
    preview: 'Amount paid: $20.00 USD. Payment method: Visa •••• 4242.',
    time: '20 Apr',
    fullDate: '20/04/2026, 09:02:18',
    unread: false,
    saved: false,
    code: null,
    body: `<div style="font-family: -apple-system, system-ui, sans-serif; color: #1f2328; background: #fff; padding: 40px; line-height: 1.6; font-size: 14px; max-width: 560px;">
      <p style="margin: 0 0 12px 0; color: #6b7280; font-size: 13px;">Receipt #2641-8832</p>
      <h2 style="font-size: 24px; margin: 0 0 32px 0;">Receipt from Vercel Inc.</h2>
      <table style="width: 100%; border-collapse: collapse; margin-bottom: 24px;">
        <tr><td style="padding: 8px 0; color: #6b7280;">Amount paid</td><td style="text-align: right; font-weight: 600;">$20.00 USD</td></tr>
        <tr><td style="padding: 8px 0; color: #6b7280;">Date paid</td><td style="text-align: right;">April 20, 2026</td></tr>
        <tr><td style="padding: 8px 0; color: #6b7280;">Payment method</td><td style="text-align: right;">Visa •••• 4242</td></tr>
      </table>
      <p style="margin: 0; color: #6b7280; font-size: 12px;">Questions? Contact receipts@stripe.com</p>
    </div>`,
  },
  {
    id: 'e6',
    from: 'Linear',
    fromEmail: 'notify@linear.app',
    avatar: 'L',
    avatarColor: '#3b3b6b',
    subject: 'You were mentioned in ENG-2481',
    preview: '@dusk can you take a look at the retry logic in the webhook handler?',
    time: '19 Apr',
    fullDate: '19/04/2026, 14:33:09',
    unread: false,
    saved: false,
    code: null,
    body: `<div style="font-family: 'Inter', system-ui, sans-serif; color: #1a1a1a; background: #fff; padding: 40px; line-height: 1.6; font-size: 14px;">
      <h3 style="margin: 0 0 16px 0; font-size: 18px;">ENG-2481 — Webhook retry throws 500 on 3rd attempt</h3>
      <div style="border-left: 3px solid #5e6ad2; padding-left: 16px; margin: 20px 0; color: #333;">
        <p style="margin: 0 0 4px 0; font-weight: 600;">Sarah Chen</p>
        <p style="margin: 0;">@dusk can you take a look at the retry logic in the webhook handler? I think we're not backing off correctly.</p>
      </div>
      <a href="#" style="display: inline-block; background: #5e6ad2; color: white; padding: 10px 18px; border-radius: 6px; text-decoration: none; font-weight: 500; font-size: 13px;">Open in Linear</a>
    </div>`,
  },
  {
    id: 'e7',
    from: 'Vercel',
    fromEmail: 'deploy@vercel.com',
    avatar: 'V',
    avatarColor: '#18181b',
    subject: 'Deployment ready — main-7f9a2c',
    preview: 'Your deployment for tempmail-ui is ready. It built in 42s.',
    time: '18 Apr',
    fullDate: '18/04/2026, 22:14:55',
    unread: false,
    saved: false,
    code: null,
    body: `<div style="font-family: 'Geist', system-ui, sans-serif; color: #000; background: #fff; padding: 40px; line-height: 1.6; font-size: 14px;">
      <p style="margin: 0 0 20px 0;">Your deployment for <strong>tempmail-ui</strong> is ready.</p>
      <div style="background: #fafafa; border: 1px solid #eaeaea; border-radius: 8px; padding: 20px; margin-bottom: 20px; font-family: 'Geist Mono', monospace; font-size: 13px;">
        <div style="color: #666; margin-bottom: 4px;">Commit</div>
        <div style="margin-bottom: 12px;">7f9a2c — fix(inbox): stabilize preview scroll</div>
        <div style="color: #666; margin-bottom: 4px;">Build time</div>
        <div>42.3s</div>
      </div>
      <a href="#" style="color: #000; text-decoration: underline;">View deployment →</a>
    </div>`,
  },
];

const RANDOM_ADDRESSES = [
  'duskonhorizon67', 'silentmoss42', 'quietfalcon18', 'brightember29', 'hollowpine83',
  'coldriver12', 'driftwood55', 'shadowpeak91', 'vagrantwolf74', 'mutedgrove33',
];

window.MOCK_DOMAINS = MOCK_DOMAINS;
window.MOCK_EMAILS = MOCK_EMAILS;
window.RANDOM_ADDRESSES = RANDOM_ADDRESSES;
