import React from 'react';
import { Dossier, PricingTier } from './types';

const coverSvg = (title: string, id: string, classification: string) => {
  // Inline SVG cover to avoid stock-photo vibe and keep distribution simple.
  const svg = `
  <svg xmlns="http://www.w3.org/2000/svg" width="800" height="1000" viewBox="0 0 800 1000">
    <rect width="800" height="1000" fill="#f7f5f0"/>
    <rect x="50" y="60" width="700" height="880" fill="#ffffff" stroke="#0f172a" stroke-opacity="0.12"/>
    <rect x="50" y="60" width="700" height="70" fill="#0b0d10"/>
    <text x="80" y="105" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-size="22" fill="#ffffff" letter-spacing="1">
      INFRAFABRIC · RED TEAM
    </text>

    <text x="80" y="205" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-size="46" font-weight="800" fill="#0f172a">
      Shadow Dossier
    </text>
    <text x="80" y="255" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-size="24" fill="#334155">
      ${title.replace(/&/g, '&amp;')}
    </text>

    <rect x="80" y="320" width="250" height="34" rx="17" fill="#ffffff" stroke="#0f172a" stroke-opacity="0.18"/>
    <text x="98" y="343" font-family="JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas" font-size="14" fill="#334155">
      CLASSIFICATION: ${classification}
    </text>

    <text x="80" y="410" font-family="JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas" font-size="14" fill="#64748b">
      DOSSIER_ID: ${id}
    </text>
    <line x1="80" y1="440" x2="720" y2="440" stroke="#0f172a" stroke-opacity="0.10"/>

    <g opacity="0.35">
      <text x="80" y="520" font-family="JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas" font-size="12" fill="#64748b">
        This document is satirical/parody and critical commentary.
      </text>
      <text x="80" y="545" font-family="JetBrains Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas" font-size="12" fill="#64748b">
        Verification artifacts (hashes, traces) are provided via the evidence index.
      </text>
    </g>

    <g opacity="0.18">
      <text x="420" y="920" font-family="Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial" font-size="120" font-weight="900" fill="#b91c1c"
        transform="rotate(-12 420 920)">SATIRE</text>
    </g>
  </svg>
  `.trim();
  return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
};

export const DOSSIERS: Dossier[] = [
  {
    id: 'snyk-mirror-01',
    title: 'The Snyk-Mirror Anomaly',
    leakDate: 'Dec 25, 2025',
    summary:
      'A satirical red-team dossier on compliance theater around AI code guardrails—where policy meets production and loses. Includes diagrams, failure modes, and a verifiability trail.',
    classification: 'EYES-ONLY',
    status: 'scheduled',
    previewImageUrl: coverSvg('The Snyk-Mirror Anomaly', 'snyk-mirror-01', 'EYES-ONLY'),

    // These are paths (not live yet). Codex/server will publish them when ready.
    pdfPath: '/static/hosted/snyk-shadow-dossier.pdf',
    evidencePath: '/static/hosted/evidence/index.html',

    // Optional: set once sales are live.
    // gumroadUrl: 'https://gumroad.com/l/your-product',
    contactEmail: 'redteam@infrafabric.io',

    // Optional: add sha256/bytes once you compute them at build time.
    // sha256: '…',
    // bytes: 1234567,
  }
];

export const PRICING_TIERS: PricingTier[] = [
  {
    name: 'Public Drop (Free)',
    price: '$0',
    variant: 'free',
    description: 'The public PDF drop. Satire/parody + critical commentary, published with a verification trail when live.',
    features: [
      'Full PDF drop (public)',
      'Diagrams & artifacts intact',
      'Evidence index link for verification',
      'No email required'
    ],
    cta: 'Request early access',
    enabled: true,
    actionUrl: 'mailto:redteam@infrafabric.io?subject=Shadow%20Dossier%20Early%20Access',
    disabledHint: 'The public drop is not published yet.'
  },
  {
    name: 'Classified Edition (PWYW)',
    price: '$29+',
    variant: 'premium',
    description: 'Annotated PDF + sources (raw Markdown + Mermaid). Sales go live when the first drop publishes.',
    features: [
      'Annotated PDF (red‑ink marginalia)',
      'Raw Markdown source',
      'Mermaid diagram sources',
      'Personalized classification ID'
    ],
    cta: 'Sales open soon',
    enabled: false,
    actionUrl: '',
    disabledHint: 'Gumroad link will be added at launch.'
  },
  {
    name: 'Custom Dossier (Service)',
    price: '$499',
    variant: 'enterprise',
    description: 'A bespoke pre‑mortem/critique of your governance or security material, delivered as a dossier.',
    features: [
      'Review of your deck/report/controls',
      'Findings + failure modes',
      'Actionable mitigation notes',
      'Delivery via email'
    ],
    cta: 'Request availability',
    enabled: true,
    actionUrl: 'mailto:dave@infrafabric.io?subject=Custom%20Shadow%20Dossier%20Inquiry'
  }
];
