// previews.jsx — Noah Aurora-compliant marketing previews

// ── Noah logo — interlocking aurora rings + indigo focal dot ─────────────
//
// Two render modes:
//   as="symbol"  (DEFAULT for the marketing site) — bare mark, no plate,
//                no backplate, no shadow. The symbol blends into the
//                page surface (cream marketing or dark in-app) instead
//                of reading as an "iOS app icon stamped on the page."
//   as="icon"    — full rounded-square plate with faint aurora wash
//                and indigo drop-glow. Reserved for the dock-style
//                contexts where the mark sits ON its own surface
//                (e.g. installer screen, dock preview). The favicon.svg
//                is a separate file because the browser tab needs the
//                plate to read at 16px.
//
// `on="auto" | "light" | "dark"` controls the symbol's "behind-the-rings"
// halo color for "icon" mode and is otherwise inert.
// Renders the canonical Noah brand mark. The geometry lives in
// noah/brand/build.py and ships to /noah-icon.svg via brand/sync.sh —
// do NOT reintroduce CSS-built arcs here, or surfaces will drift.
//
// Props (radius/glow/on/as) are kept for back-compat with existing call
// sites but are no-ops; the SVG itself carries glow + transparency.
function NoahLogo({ size = 40, radius, glow, on, as }) {
  return (
    <img
      src="/noah-icon.svg"
      alt="Noah"
      width={size}
      height={size}
      style={{ width: size, height: size, flexShrink: 0, display: "inline-block" }}
    />
  );
}

// ── Lucide-style icons (1.75 stroke) matching src/shared.jsx ─────────────

function I({ d, size = 18 }) {
  return <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round">{d}</svg>;
}
const Icon = {
  Gauge:    (p) => <I {...p} d={<><path d="M12 14l4-4" /><circle cx="12" cy="14" r="8" /><path d="M12 6V4" /><path d="M4 14h2" /><path d="M20 14h-2" /></>} />,
  Wifi:     (p) => <I {...p} d={<><path d="M5 12.55a11 11 0 0 1 14 0" /><path d="M1.42 9a16 16 0 0 1 21.16 0" /><path d="M8.53 16.11a6 6 0 0 1 6.95 0" /><circle cx="12" cy="20" r="1" fill="currentColor" /></>} />,
  Alert:    (p) => <I {...p} d={<><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" /><line x1="12" y1="9" x2="12" y2="13" /><line x1="12" y1="17" x2="12.01" y2="17" /></>} />,
  Cable:    (p) => <I {...p} d={<><path d="M4 9a2 2 0 0 1 2-2h2v6H6a2 2 0 0 1-2-2z" /><path d="M8 7V3" /><path d="M16 21v-4" /><path d="M20 15a2 2 0 0 1-2 2h-2v-6h2a2 2 0 0 1 2 2z" /><path d="M16 11V7a4 4 0 0 0-4-4 4 4 0 0 0-4 4v10a4 4 0 0 0 4 4 4 4 0 0 0 4-4" /></>} />,
  Battery:  (p) => <I {...p} d={<><rect x="2" y="7" width="16" height="10" rx="2" /><line x1="22" y1="11" x2="22" y2="13" /><line x1="6" y1="11" x2="7" y2="11" strokeWidth="3" /></>} />,
  Refresh:  (p) => <I {...p} d={<><polyline points="23 4 23 10 17 10" /><polyline points="1 20 1 14 7 14" /><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10" /><path d="M20.49 15a9 9 0 0 1-14.85 3.36L1 14" /></>} />,
  Settings: (p) => <I {...p} d={<><circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" /></>} />,
  Msg:      (p) => <I {...p} d={<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />} />,
  HardDrive:(p) => <I {...p} d={<><line x1="22" y1="12" x2="2" y2="12" /><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" /><line x1="6" y1="16" x2="6.01" y2="16" /><line x1="10" y1="16" x2="10.01" y2="16" /></>} />,
  Mic:      (p) => <I {...p} d={<><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" /><path d="M19 10v2a7 7 0 0 1-14 0v-2" /><line x1="12" y1="19" x2="12" y2="23" /><line x1="8" y1="23" x2="16" y2="23" /></>} />,
  Cloud:    (p) => <I {...p} d={<path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z" />} />,
  Sparkle:  (p) => <svg width={p.size || 14} height={p.size || 14} viewBox="0 0 24 24" fill="currentColor"><path d="M12 2l1.5 5.5L19 9l-5.5 1.5L12 16l-1.5-5.5L5 9l5.5-1.5z" /></svg>,
  Arrow:    (p) => <I {...p} d={<><line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" /></>} />,
  Check:    (p) => <svg width={p.size || 14} height={p.size || 14} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"><polyline points="20 6 9 17 4 12" /></svg>,
};

// Tiles tuned for the ICP: knowledge worker whose {device} is their primary
// income tool. Each tile is a moment that breaks the workday — fast to
// self-identify, actually fixable by Noah's tool set.
//   {device} in title is substituted to "Mac" / "PC" by WhatIFix in site.jsx.
const ISSUES = [
  { key: "slow",    Icon: Icon.Gauge,     title: "My {device} feels slow",       sub: "Freezes, fan spins, apps lag" },
  { key: "wifi",    Icon: Icon.Wifi,      title: "Wi-Fi or internet issues",     sub: "Slow, dropping, fails on Zoom" },
  { key: "crash",   Icon: Icon.Alert,     title: "An app keeps crashing",        sub: "Quits, freezes, won't open" },
  { key: "storage", Icon: Icon.HardDrive, title: "Storage almost full",          sub: "Can't save, downloads piling up" },
  { key: "battery", Icon: Icon.Battery,   title: "Battery drains fast",          sub: "Dies mid-meeting, runs hot" },
  { key: "av",      Icon: Icon.Mic,       title: "Mic, camera, or audio",        sub: "Won't work in Zoom or Teams" },
  { key: "sync",    Icon: Icon.Cloud,     title: "Files won't sync",             sub: "iCloud, Dropbox, OneDrive stuck" },
  { key: "other",   Icon: Icon.Msg,       title: "Something else",               sub: "Tell me in your words" },
];

// ── macOS window chrome — matches the in-app MacChrome ───────────────────

function MacChrome({ children, title = "Noah", style = {} }) {
  return (
    <div style={{
      borderRadius: 14, overflow: "hidden",
      background: "var(--bg-primary)",
      boxShadow: "0 30px 60px -20px rgba(15,23,41,0.22), 0 0 0 1px rgba(15,23,41,0.06)",
      color: "var(--text-primary)",
      ...style,
    }}>
      <div style={{
        position: "relative", height: 36, padding: "0 14px",
        display: "flex", alignItems: "center",
      }}>
        <div style={{ display: "flex", gap: 7 }}>
          <div style={{ width: 12, height: 12, borderRadius: "50%", background: "#ff5f57", border: "0.5px solid rgba(0,0,0,0.12)" }} />
          <div style={{ width: 12, height: 12, borderRadius: "50%", background: "#febc2e", border: "0.5px solid rgba(0,0,0,0.12)" }} />
          <div style={{ width: 12, height: 12, borderRadius: "50%", background: "#28c840", border: "0.5px solid rgba(0,0,0,0.12)" }} />
        </div>
        <div style={{ flex: 1, textAlign: "center", fontSize: 12, color: "var(--text-muted)", fontWeight: 500, letterSpacing: "-0.01em" }}>{title}</div>
        <div style={{ width: 54 }} />
      </div>
      {children}
    </div>
  );
}

// ── Windows 11 window chrome ─────────────────────────────────────────────
// Mirrors Windows 11 conventions: title + icon on the left, system
// buttons (minimize / maximize / close) as small SVG glyphs on the
// right. Less radius than macOS (Win11 uses ~8 px on app windows).
// Close button hovers red — kept that detail because Win users notice
// when it doesn't.

function WindowsChrome({ children, title = "Noah", style = {} }) {
  const btn = {
    width: 36, height: 32,
    display: "flex", alignItems: "center", justifyContent: "center",
    color: "var(--text-muted)",
  };
  return (
    <div style={{
      borderRadius: 8, overflow: "hidden",
      background: "var(--bg-primary)",
      boxShadow: "0 30px 60px -20px rgba(15,23,41,0.22), 0 0 0 1px rgba(15,23,41,0.06)",
      color: "var(--text-primary)",
      ...style,
    }}>
      <div style={{
        position: "relative", height: 32, paddingLeft: 12,
        display: "flex", alignItems: "center",
        borderBottom: "1px solid var(--border-soft)",
      }}>
        {/* Small app icon, left of title */}
        <div style={{
          width: 14, height: 14, borderRadius: 3,
          background: "var(--aurora)", marginRight: 8, flexShrink: 0,
          boxShadow: "0 2px 4px -2px rgba(99,102,241,0.6)",
        }} />
        <div style={{ flex: 1, fontSize: 11.5, color: "var(--text-secondary)", fontWeight: 500, letterSpacing: "-0.01em" }}>{title}</div>
        {/* Min / Max / Close buttons */}
        <div style={{ display: "flex" }}>
          {/* minimize — single horizontal line */}
          <div style={btn} aria-hidden>
            <svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" strokeWidth="1">
              <line x1="1" y1="5" x2="9" y2="5" />
            </svg>
          </div>
          {/* maximize — square outline */}
          <div style={btn} aria-hidden>
            <svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" strokeWidth="1">
              <rect x="1" y="1" width="8" height="8" />
            </svg>
          </div>
          {/* close — X */}
          <div style={btn} aria-hidden>
            <svg width="10" height="10" viewBox="0 0 10 10" fill="none" stroke="currentColor" strokeWidth="1">
              <line x1="1" y1="1" x2="9" y2="9" />
              <line x1="9" y1="1" x2="1" y2="9" />
            </svg>
          </div>
        </div>
      </div>
      {children}
    </div>
  );
}

// ── OsChrome — picks the right chrome from window.NOAH_PLATFORM ──────────
// Used by preview components so the /windows landing renders Windows
// chrome and the / landing renders Mac chrome without each preview
// component having to know about the platform.
function OsChrome(props) {
  const isWin = typeof window !== "undefined" && window.NOAH_PLATFORM === "windows";
  return isWin ? <WindowsChrome {...props} /> : <MacChrome {...props} />;
}

// ── Aurora blob — ambient lighting inside frames ─────────────────────────

function AuroraBlob({ size = 480, x = "50%", y = "20%", opacity = 0.35 }) {
  return (
    <div aria-hidden style={{
      position: "absolute", left: x, top: y,
      width: size, height: size, transform: "translate(-50%, -50%)",
      borderRadius: "50%", background: "var(--aurora)",
      filter: "blur(70px)", opacity, pointerEvents: "none",
    }} />
  );
}

// ── Issue picker — Aurora canonical (matches Variation A) ────────────────

function IssuePicker({ activeKey = "slow", compact = false, device = "Mac" }) {
  return (
    <OsChrome title="Noah">
      <div style={{ position: "relative", overflow: "hidden", padding: compact ? "32px 28px 36px" : "44px 40px 48px" }}>
        <AuroraBlob size={520} x="50%" y="-10%" opacity={0.18} />
        <div style={{ position: "relative", textAlign: "center", marginBottom: 22 }}>
          <div style={{ display: "inline-flex", justifyContent: "center", marginBottom: 14 }}>
            <NoahLogo size={56} radius={14} />
          </div>
          <div className="eyebrow" style={{ justifyContent: "center" }}>Step 1 of 3</div>
          <h3 style={{
            fontSize: compact ? 22 : 26, fontWeight: 700, color: "var(--text-primary)",
            letterSpacing: "-0.02em", margin: "10px 0 4px",
          }}>
            What's going on with your computer?
          </h3>
          <p style={{ fontSize: 13.5, color: "var(--text-muted)", margin: 0 }}>
            Pick the closest match — you can tell me more in a moment.
          </p>
        </div>
        <div style={{
          display: "grid", gridTemplateColumns: "1fr 1fr", gap: 8,
          maxWidth: 660, margin: "0 auto", position: "relative",
        }}>
          {ISSUES.map((tile) => {
            const Ic = tile.Icon;
            const active = tile.key === activeKey;
            const title = tile.title.replace("{device}", device);
            return (
              <div key={tile.key} style={{
                display: "flex", alignItems: "flex-start", gap: 12,
                padding: "13px 14px", borderRadius: 12,
                background: active ? "var(--aurora-soft)" : "var(--bg-secondary)",
                border: `1px solid ${active ? "var(--border-aurora)" : "var(--card-border)"}`,
                boxShadow: active ? "var(--aurora-ring)" : "var(--card-shadow)",
                transition: "all 200ms ease",
              }}>
                <div style={{
                  width: 32, height: 32, borderRadius: 9, flexShrink: 0,
                  background: active ? "var(--aurora)" : "var(--bg-tertiary)",
                  color: active ? "#fff" : "var(--text-secondary)",
                  display: "flex", alignItems: "center", justifyContent: "center",
                  boxShadow: active ? "var(--aurora-glow)" : "none",
                }}>
                  <Ic size={15} />
                </div>
                <div style={{ minWidth: 0 }}>
                  <div style={{ fontSize: 13, fontWeight: 600, color: "var(--text-primary)", lineHeight: 1.3, letterSpacing: "-0.005em" }}>{title}</div>
                  <div style={{ fontSize: 11.5, color: "var(--text-muted)", lineHeight: 1.4, marginTop: 2 }}>{tile.sub}</div>
                </div>
              </div>
            );
          })}
        </div>
      </div>
    </OsChrome>
  );
}

// ── Conversation — Aurora canonical ──────────────────────────────────────

function NoahBubble({ children }) {
  return (
    <div style={{ display: "flex", alignItems: "flex-start", gap: 11, marginBottom: 14 }}>
      <NoahLogo size={28} radius={9} glow={false} />
      <div style={{ maxWidth: "82%", fontSize: 13.5, lineHeight: 1.55, color: "var(--text-primary)", paddingTop: 4 }}>
        {children}
      </div>
    </div>
  );
}

function UserBubble({ children }) {
  return (
    <div style={{ display: "flex", justifyContent: "flex-end", marginBottom: 14, paddingRight: 4 }}>
      <div style={{
        maxWidth: "70%", padding: "10px 15px", borderRadius: 16,
        background: "var(--user-bubble)", color: "var(--user-bubble-text)",
        fontSize: 13.5, lineHeight: 1.55,
        border: document.documentElement.classList.contains("dark") ? "none" : "1px solid var(--card-border)",
      }}>{children}</div>
    </div>
  );
}

function DiagnosticCard() {
  // Tool names shown in the preview are illustrative of what Noah's
  // hand-built tools look like; the marketing transparency argument
  // ("auditable, not arbitrary shell") doesn't depend on the exact
  // platform prefix. Generic names read the same on Mac and Windows
  // landings and avoid a Mac-flavored bias on /windows.
  const lines = [
    { label: "Listed running processes",  tool: "list_processes",  done: true },
    { label: "Checked CPU & memory",      tool: "system_info",     done: true },
    { label: "Scanning disk activity…",   tool: "disk_usage",      done: false },
  ];
  return (
    <div className="card" style={{ marginLeft: 39, padding: "14px 16px", maxWidth: 400 }}>
      <div style={{ display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }}>
        <span style={{ width: 7, height: 7, borderRadius: 4, background: "var(--commit-bright)", boxShadow: "0 0 6px var(--commit-bright)" }} className="pulse" />
        <span style={{ fontSize: 11.5, fontWeight: 600, color: "var(--text-secondary)", letterSpacing: "-0.005em" }}>Looking into it…</span>
        <span style={{ marginLeft: "auto", fontSize: 10.5, color: "var(--text-muted)", fontFamily: "ui-monospace, monospace" }}>3 tools</span>
      </div>
      <div style={{ display: "flex", flexDirection: "column", gap: 6 }}>
        {lines.map((l, i) => (
          <div key={i} style={{ display: "flex", alignItems: "center", gap: 9 }}>
            <span style={{
              width: 14, height: 14, borderRadius: 7,
              background: l.done ? "var(--commit-soft)" : "transparent",
              border: l.done ? "none" : "1.5px solid var(--text-muted)",
              display: "flex", alignItems: "center", justifyContent: "center",
              flexShrink: 0,
            }}>
              {l.done && <Icon.Check size={10} style={{ color: "var(--commit-bright)" }} />}
            </span>
            <span style={{ fontSize: 12.5, color: l.done ? "var(--text-primary)" : "var(--text-secondary)" }}>{l.label}</span>
            <span style={{ marginLeft: "auto", fontSize: 10.5, color: "var(--text-muted)", fontFamily: "ui-monospace, monospace" }}>{l.tool}</span>
          </div>
        ))}
      </div>
    </div>
  );
}

function ProposalCard({ accent = true }) {
  return (
    <div className={accent ? "card accent" : "card"} style={{ marginLeft: 39, padding: "14px 16px", maxWidth: 420 }}>
      <div className="eyebrow" style={{ marginBottom: 8 }}>Plan</div>
      <div style={{ fontSize: 14, color: "var(--text-primary)", fontWeight: 600, letterSpacing: "-0.01em" }}>
        Restart Slack
      </div>
      <div style={{ fontSize: 12.5, color: "var(--text-secondary)", marginTop: 4, lineHeight: 1.5 }}>
        Slack Helper has leaked 11 GB of RAM after running for 4 days. Restarting will free that memory; unread messages reload from the server.
      </div>
      <div style={{ marginTop: 12, display: "flex", gap: 8, alignItems: "center" }}>
        <button className="btn-aurora" style={{ padding: "8px 14px", fontSize: 13 }}>
          <Icon.Sparkle size={12} /> Approve
        </button>
        <button style={{
          padding: "8px 12px", borderRadius: 10,
          border: "1px solid var(--card-border)",
          background: "transparent", color: "var(--text-secondary)",
          fontSize: 12.5, fontWeight: 500, cursor: "pointer",
          fontFamily: "inherit",
        }}>Explain first</button>
      </div>
    </div>
  );
}

function ConversationPreview() {
  return (
    <OsChrome title="Noah">
      <div style={{ display: "flex", height: 540 }}>
        {/* Sidebar — quieter, matches the actual app */}
        <div style={{
          width: 200, flexShrink: 0,
          background: "var(--bg-primary)",
          borderRight: "1px solid var(--border-soft)",
          padding: "10px 10px 14px",
          display: "flex", flexDirection: "column", gap: 2,
        }}>
          {[
            { icon: "＋", label: "New chat" },
            { icon: "☷", label: "Knowledge" },
          ].map((it) => (
            <div key={it.label} style={{
              display: "flex", alignItems: "center", gap: 9,
              padding: "6px 9px", borderRadius: 8,
              fontSize: 12, color: "var(--text-secondary)", fontWeight: 500,
            }}>
              <span style={{ width: 14, textAlign: "center", opacity: 0.7, fontSize: 12 }}>{it.icon}</span>
              {it.label}
            </div>
          ))}
          <div style={{ fontSize: 10, fontWeight: 600, letterSpacing: "0.14em", textTransform: "uppercase", color: "var(--text-muted)", padding: "14px 10px 6px" }}>Today</div>
          {[
            { title: "My computer feels slow", active: true, when: "now" },
            { title: "Wi-Fi keeps dropping", when: "Yesterday" },
            { title: "Pages.app won't open", when: "Mon" },
          ].map((c, i) => (
            <div key={i} style={{
              padding: "7px 9px", borderRadius: 8,
              background: c.active ? "var(--aurora-soft)" : "transparent",
              position: "relative",
            }}>
              {c.active && <div style={{ position: "absolute", left: 0, top: 7, bottom: 7, width: 2, background: "var(--aurora)", borderRadius: 1 }} />}
              <div style={{
                fontSize: 12, color: c.active ? "var(--text-primary)" : "var(--text-secondary)",
                fontWeight: c.active ? 600 : 500, lineHeight: 1.35, letterSpacing: "-0.005em",
                whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis",
              }}>{c.title}</div>
              <div style={{ fontSize: 10, color: "var(--text-muted)", marginTop: 2 }}>{c.when}</div>
            </div>
          ))}
        </div>

        {/* Conversation column */}
        <div style={{ flex: 1, display: "flex", flexDirection: "column", minWidth: 0 }}>
          <div style={{ flex: 1, padding: "20px 28px 18px", overflow: "hidden" }}>
            <UserBubble>
              My laptop has been crawling all morning. Slack is laggy too \u2014 started yesterday.
            </UserBubble>
            <NoahBubble>
              Let me check before I suggest anything.
            </NoahBubble>
            <DiagnosticCard />
            <div style={{ height: 16 }} />
            <NoahBubble>
              Found it. <b>Slack Helper</b> has leaked 11 GB of memory after running for 4 days.
            </NoahBubble>
            <ProposalCard />
          </div>

          {/* Composer */}
          <div style={{ padding: "12px 20px 16px", borderTop: "1px solid var(--border-soft)" }}>
            <div style={{
              position: "relative", height: 44, borderRadius: 14,
              background: "var(--bg-input)",
              border: "1px solid var(--border-aurora)",
              boxShadow: "0 0 0 3px var(--aurora-soft), 0 1px 2px rgba(0,0,0,0.04)",
              display: "flex", alignItems: "center", padding: "0 6px 0 16px",
            }}>
              <div style={{ flex: 1, fontSize: 13.5, color: "var(--text-muted)" }}>
                Reply to Noah…
              </div>
              <button style={{
                width: 32, height: 32, borderRadius: 10, border: "none",
                background: "var(--aurora)", color: "#fff",
                display: "flex", alignItems: "center", justifyContent: "center",
                boxShadow: "0 4px 12px -2px rgba(99,102,241,0.5)",
                cursor: "pointer",
              }}>
                <Icon.Arrow size={14} />
              </button>
            </div>
          </div>
        </div>
      </div>
    </OsChrome>
  );
}

// ── Mini conversation — for hero chat variant ────────────────────────────

function MiniConversation() {
  return (
    <OsChrome title="Noah" style={{ maxWidth: 480 }}>
      <div style={{ padding: "18px 22px 22px" }}>
        <UserBubble>My laptop has been crawling all morning. Slack is laggy too.</UserBubble>
        <NoahBubble>
          Found it. <b>Slack Helper</b> has leaked 11 GB of memory after running for 4 days.
        </NoahBubble>
        <ProposalCard />
      </div>
    </OsChrome>
  );
}

Object.assign(window, { NoahLogo, Icon, ISSUES, MacChrome, WindowsChrome, OsChrome, AuroraBlob, IssuePicker, ConversationPreview, MiniConversation, NoahBubble, UserBubble, ProposalCard, DiagnosticCard });
