const OMNI_EVENTS = [
  { k: 'voice', icon: 'phone', ch: 'Voice call', ts: 'Mon 10:12', sub: 'Inbound · 3:48', by: 'AI agent' },
  { k: 'chat', icon: 'message-square-text', ch: 'Web chat', ts: 'Mon 16:40', sub: 'Qualification · 6 msgs', by: 'AI agent' },
  { k: 'wa', icon: 'message-circle', ch: 'WhatsApp', ts: 'Tue 09:05', sub: 'Quote question', by: 'AI agent' },
  { k: 'email', icon: 'mail', ch: 'Email', ts: 'Tue 09:06', sub: 'Re: Cold-chain quote', by: 'Draft · review' },
  { k: 'sms', icon: 'smartphone', ch: 'SMS', ts: 'Tue 15:30', sub: 'Callback reminder', by: 'Auto' },
];

function useStepper(total, ms, key) {
  const [n, setN] = React.useState(1);
  React.useEffect(() => { setN(1); }, [key]);
  React.useEffect(() => { if (n >= total) return; const t = setTimeout(() => setN(n + 1), ms); return () => clearTimeout(t); }, [n, total, ms]);
  return n;
}

function Bubble({ me, children, meta, tint }) {
  return (
    <div style={{ display: 'flex', justifyContent: me ? 'flex-end' : 'flex-start', animation: 'yk-fade-up .3s cubic-bezier(.22,1,.36,1) both' }}>
      <div style={{ maxWidth: '82%', background: me ? (tint || 'var(--yk-lavender)') : '#fff', border: me ? '0' : '1px solid var(--border-default)', borderRadius: me ? '12px 12px 3px 12px' : '12px 12px 12px 3px', padding: '7px 10px' }}>
        <div style={{ font: '400 12px/1.45 var(--font-body)', color: 'var(--yk-indigo)' }}>{children}</div>
        {meta && <div style={{ display: 'flex', justifyContent: 'flex-end', gap: 4, marginTop: 2 }}>{meta}</div>}
      </div>
    </div>
  );
}

function Typing() {
  return (
    <div style={{ display: 'flex', gap: 3, padding: '9px 12px', background: '#fff', border: '1px solid var(--border-default)', borderRadius: '12px 12px 12px 3px', alignSelf: 'flex-start' }}>
      {[0, 1, 2].map((i) => <span key={i} style={{ width: 5, height: 5, borderRadius: '50%', background: 'var(--yk-slate-400)', animation: `yk-pulse 1s ${i * 0.15}s infinite` }} />)}
    </div>
  );
}

function PaneVoice() {
  const { Icon, Badge, Button } = DS;
  const narrow2 = useMedia('(max-width: 720px)');
  const [play, setPlay] = React.useState(true);
  const [pos, setPos] = React.useState(0.32);
  React.useEffect(() => { if (!play) return; const t = setInterval(() => setPos((p) => (p >= 1 ? 0 : p + 0.012)), 180); return () => clearInterval(t); }, [play]);
  const bars = narrow2 ? 40 : 64;
  const emo = [['Neutral', 0.22, '#94A3B8'], ['Concerned', 0.3, '#F59E0B'], ['Neutral', 0.18, '#94A3B8'], ['Positive', 0.3, '#10B981']];
  const sec = Math.round(pos * 228);
  const curEmo = (() => { let a = 0; for (const e of emo) { a += e[1]; if (pos <= a) return e; } return emo[emo.length - 1]; })();
  return (
    <div style={{ display: 'grid', gridTemplateColumns: 'minmax(0,1fr)', gap: 10 }}>
      <div style={{ border: '1px solid var(--border-default)', borderRadius: 10, padding: 10 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 10, flexWrap: narrow2 ? 'wrap' : 'nowrap' }}>
          <button type="button" aria-label={play ? 'Pause' : 'Play'} onClick={() => setPlay(!play)} style={{ width: 30, height: 30, borderRadius: '50%', border: 0, background: 'var(--yk-violet)', color: '#fff', display: 'grid', placeItems: 'center', cursor: 'pointer', flex: 'none' }}><Icon name={play ? 'pause' : 'play'} size={14} /></button>
          <div onClick={(e) => { const r = e.currentTarget.getBoundingClientRect(); setPos((e.clientX - r.left) / r.width); }} style={{ flex: 1, display: 'flex', alignItems: 'center', gap: 2, height: 34, cursor: 'pointer', minWidth: 0, overflow: 'hidden' }}>
            {Array.from({ length: bars }).map((_, i) => <span key={i} style={{ flex: 1, minWidth: 1, height: `${25 + 75 * Math.abs(Math.sin(i * 0.9) * Math.cos(i * 0.31))}%`, borderRadius: 1, background: i / bars <= pos ? 'var(--yk-violet)' : '#D9DDEA' }} />)}
          </div>
          {!narrow2 && <MonoLabel style={{ fontSize: 10.5, flex: 'none', whiteSpace: 'nowrap' }}>{`${Math.floor(sec / 60)}:${String(sec % 60).padStart(2, '0')} / 3:48`}</MonoLabel>}
        </div>
        {narrow2 && <div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: 4 }}><MonoLabel style={{ fontSize: 10.5 }}>{`${Math.floor(sec / 60)}:${String(sec % 60).padStart(2, '0')} / 3:48`}</MonoLabel></div>}
        <div style={{ display: 'flex', height: 6, borderRadius: 3, overflow: 'hidden', marginTop: 8, marginLeft: 40 }}>{emo.map(([n, w, c], i) => <span key={i} title={n} style={{ flex: w, background: c, opacity: 0.85 }} />)}</div>
        <div style={{ display: 'flex', gap: 10, marginTop: 6, marginLeft: 40, flexWrap: 'wrap' }}>
          {[['Neutral', '#94A3B8'], ['Concerned', '#F59E0B'], ['Positive', '#10B981']].map(([n, c]) => <span key={n} style={{ display: 'inline-flex', alignItems: 'center', gap: 4, font: '400 10.5px var(--font-body)', color: 'var(--text-muted)' }}><span style={{ width: 7, height: 7, borderRadius: 2, background: c }} />{n}</span>)}
          <span style={{ marginLeft: 'auto', font: '500 10.5px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap' }}>Now: <span style={{ color: curEmo[2] }}>{curEmo[0]}</span></span>
        </div>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: narrow2 ? 'minmax(0,1fr)' : 'repeat(2, minmax(0,1fr))', gap: 8 }}>
        <div style={{ border: '1px solid var(--border-default)', borderRadius: 10, padding: 10 }}>
          <div style={{ font: '500 11px var(--font-body)', color: 'var(--text-muted)' }}>Sentiment</div>
          <div style={{ display: 'flex', alignItems: 'baseline', gap: 6, marginTop: 2 }}><span style={{ font: '600 18px var(--font-display)', color: 'var(--yk-success)' }}>+0.72</span><span style={{ font: '500 11.5px var(--font-body)', color: 'var(--yk-indigo)' }}>Positive</span></div>
          <div style={{ position: 'relative', height: 5, borderRadius: 3, background: 'linear-gradient(90deg,#FCA5A5,#E2E8F0 50%,#6EE7B7)', marginTop: 8 }}><span style={{ position: 'absolute', left: '86%', top: -3, width: 3, height: 11, borderRadius: 2, background: 'var(--yk-indigo)' }} /></div>
        </div>
        <div style={{ border: '1px solid var(--border-default)', borderRadius: 10, padding: 10 }}>
          <div style={{ font: '500 11px var(--font-body)', color: 'var(--text-muted)' }}>Emotion shift</div>
          <div style={{ display: 'flex', alignItems: 'center', gap: 6, marginTop: 6, flexWrap: 'wrap' }}><Badge size="sm" tone="warning">Concerned · pricing</Badge><Icon name="arrow-right" size={12} color="var(--text-subtle)" /><Badge size="sm" tone="success">Relieved · SLA</Badge></div>
        </div>
      </div>
      <div style={{ border: '1px solid var(--border-default)', borderRadius: 10, padding: 10 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}><Icon name="sparkles" size={13} color="var(--yk-violet)" /><span style={{ font: '600 11.5px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap' }}>AI summary</span></div>
        <p style={{ font: '400 12px/1.5 var(--font-body)', color: 'var(--yk-charcoal)', marginTop: 4 }}>Needs weekly cold-chain pickups for 40 clinics in Bengaluru, 2–8°C. Worried about missed pickups; reassured by the 2-hour SLA. Wants pricing this week.</p>
      </div>
      <div style={{ display: 'flex', flexDirection: narrow2 ? 'column' : 'row', alignItems: narrow2 ? 'stretch' : 'center', gap: 10, border: '1px solid #DDD6FE', background: 'var(--yk-violet-50)', borderRadius: 10, padding: '8px 10px' }}>
        <div style={{ display: 'flex', alignItems: 'flex-start', gap: 10, flex: 1, minWidth: 0 }}>
          <Icon name="list-todo" size={15} color="var(--yk-violet)" />
          <div style={{ flex: 1, minWidth: 0 }}><div style={{ font: '600 11.5px var(--font-body)', color: 'var(--yk-indigo)' }}>Next step</div><div style={{ font: '400 11.5px var(--font-body)', color: 'var(--yk-charcoal)' }}>Send quote on WhatsApp · assign Priya S. for callback</div></div>
        </div>
        <Button size="sm" style={{ height: 28, fontSize: 12, padding: '0 10px', alignSelf: narrow2 ? 'flex-start' : 'center' }}>Create task</Button>
      </div>
    </div>
  );
}

function ChatShell({ head, icon, sub, children, input, bg = '#F7F8FC' }) {
  const { Icon } = DS;
  return (
    <div style={{ border: '1px solid var(--border-default)', borderRadius: 12, overflow: 'hidden', display: 'grid', gridTemplateColumns: 'minmax(0,1fr)', gridTemplateRows: 'auto 1fr auto', height: '100%' }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '8px 10px', background: '#fff', borderBottom: '1px solid var(--border-default)' }}>
        <span style={{ width: 26, height: 26, borderRadius: '50%', background: 'var(--yk-indigo)', color: '#fff', display: 'grid', placeItems: 'center', flex: 'none' }}><Icon name={icon} size={13} /></span>
        <div style={{ minWidth: 0, flex: 1 }}><div style={{ font: '600 12px var(--font-body)', color: 'var(--yk-indigo)' }}>{head}</div><MonoLabel style={{ fontSize: 10 }}>{sub}</MonoLabel></div>
      </div>
      <div style={{ background: bg, padding: 10, display: 'flex', flexDirection: 'column', gap: 6, overflow: 'hidden', justifyContent: 'flex-end' }}>{children}</div>
      {input && <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '7px 10px', background: '#fff', borderTop: '1px solid var(--border-default)' }}><span style={{ flex: 1, font: '400 12px var(--font-body)', color: 'var(--text-subtle)' }}>{input}</span><Icon name="send" size={14} color="var(--yk-violet)" /></div>}
    </div>
  );
}

function PaneChat() {
  const { Icon } = DS;
  const msgs = [
    [0, 'Hi, I\u2019m Northwind\u2019s assistant. What do you need moved?'],
    [1, 'Weekly pickups of vaccines from 40 clinics.'],
    [0, 'Understood. Which city are the clinics in?', ['Bengaluru', 'Chennai', 'Multiple cities']],
    [1, 'Bengaluru'],
    [0, 'Do you need temperature control? Most vaccine loads need 2\u20138\u00b0C.', ['Yes, 2\u20138\u00b0C', 'Not sure']],
    [1, 'Yes, 2\u20138\u00b0C. Saturdays too if possible.'],
    [0, 'Thanks. I\u2019ve saved this to your record. Can I send the quote on WhatsApp?'],
  ];
  const n = useStepper(msgs.length + 1, 1100, 'chat');
  const shown = msgs.slice(0, Math.min(n, msgs.length));
  const typing = n <= msgs.length && msgs[n] && msgs[n][0] === 0;
  return (
    <ChatShell head="Northwind Assistant" icon="bot" sub="AI · on website · qualifying" input="Type a message\u2026">
      {shown.slice(-5).map(([me, t, qr], i) => (
        <React.Fragment key={t}>
          <Bubble me={!!me} tint="var(--yk-indigo)">{me ? <span style={{ color: '#fff' }}>{t}</span> : t}</Bubble>
          {qr && i === shown.slice(-5).length - 1 && <div style={{ display: 'flex', gap: 4, flexWrap: 'wrap' }}>{qr.map((q) => <span key={q} style={{ font: '500 11px var(--font-body)', color: 'var(--yk-violet)', border: '1px solid #DDD6FE', background: '#fff', borderRadius: 999, padding: '3px 9px' }}>{q}</span>)}</div>}
        </React.Fragment>
      ))}
      {typing && <Typing />}
    </ChatShell>
  );
}

function PaneWhatsApp() {
  const { Icon } = DS;
  const ticks = <Icon name="check-check" size={12} color="var(--yk-sky-700)" />;
  const msgs = [
    [1, 'Hi, is the quote valid for Saturday pickups too?', '09:04'],
    [0, 'Yes. Saturday pickups are included at the same weekly rate. Here\u2019s the updated quote:', '09:05', true],
    [1, 'Great. Can someone from sales call me tomorrow?', '09:07'],
    [0, 'Done. Priya from our sales team will call you Wed at 11:00. You\u2019ll get an SMS reminder.', '09:07'],
  ];
  const n = useStepper(msgs.length + 1, 1300, 'wa');
  return (
    <ChatShell head="Northwind Freight" icon="message-circle" sub="WhatsApp Business · AI replies" input="Message" bg="#F3F1EC">
      {msgs.slice(0, Math.min(n, msgs.length)).map(([cust, t, tm, doc]) => (
        <div key={t} style={{ display: 'grid', gap: 4 }}>
          {/* customer on left, business (AI) on right */}
          <Bubble me={!cust} tint="#DCF5E6" meta={<><MonoLabel style={{ fontSize: 9.5 }}>{tm}</MonoLabel>{!cust && ticks}</>}>{t}</Bubble>
          {doc && <div style={{ alignSelf: 'flex-end', display: 'flex', alignItems: 'center', gap: 8, background: '#fff', border: '1px solid var(--border-default)', borderRadius: 10, padding: '6px 10px', animation: 'yk-fade-up .3s both' }}><Icon name="file-text" size={16} color="#DC2626" /><div><div style={{ font: '600 11.5px var(--font-body)', color: 'var(--yk-indigo)' }}>Quote_Medline_v2.pdf</div><MonoLabel style={{ fontSize: 9.5 }}>2 pages · 184 KB</MonoLabel></div></div>}
        </div>
      ))}
      {n <= msgs.length && msgs[n] && msgs[n][0] === 0 && <div style={{ alignSelf: 'flex-end' }}><Typing /></div>}
    </ChatShell>
  );
}

function PaneEmail() {
  const { Icon, Badge, Button } = DS;
  const [sent, setSent] = React.useState(false);
  return (
    <div style={{ border: '1px solid var(--border-default)', borderRadius: 12, overflow: 'hidden', display: 'grid', gridTemplateColumns: 'minmax(0,1fr)', gridTemplateRows: 'auto auto 1fr', height: '100%' }}>
      <div style={{ padding: '8px 12px', borderBottom: '1px solid var(--border-default)', display: 'flex', alignItems: 'center', gap: 8 }}><Icon name="inbox" size={14} color="var(--yk-violet)" /><span style={{ font: '600 12px var(--font-body)', color: 'var(--yk-indigo)', flex: 1, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>Re: Cold-chain pickup quote</span><MonoLabel style={{ fontSize: 10 }}>Tue 08:58</MonoLabel></div>
      <div style={{ padding: '10px 12px', borderBottom: '1px solid #EEF1F7' }}>
        <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}><span style={{ width: 24, height: 24, borderRadius: '50%', background: '#E0F2FE', color: '#0369A1', display: 'grid', placeItems: 'center', font: '600 10px var(--font-body)' }}>AM</span><span style={{ font: '600 11.5px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap' }}>Anita Menon</span><MonoLabel style={{ fontSize: 10 }}>anita@medline.in</MonoLabel></div>
        <p style={{ font: '400 12px/1.5 var(--font-body)', color: 'var(--yk-charcoal)', marginTop: 6 }}>Hi, could you send the SLA terms for missed pickups and confirm the cut-off time for Saturday collections? Our procurement team needs both before Friday.</p>
      </div>
      <div style={{ padding: '10px 12px', background: '#FBFAFF', display: 'flex', flexDirection: 'column', gap: 8 }}>
        <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}><Icon name="sparkles" size={13} color="var(--yk-violet)" /><span style={{ font: '600 11.5px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap' }}>AI draft reply</span><span style={{ flex: 1 }} />{sent ? <Badge size="sm" tone="success" dot>Sent 09:06 · by Priya S.</Badge> : <Badge size="sm" tone="warning" dot>Needs review</Badge>}</div>
        <div style={{ border: '1px solid #DDD6FE', background: '#fff', borderRadius: 8, padding: '8px 10px', font: '400 12px/1.5 var(--font-body)', color: 'var(--yk-charcoal)' }}>Hi Anita, the SLA is attached: missed pickups are re-collected within 2 hours, or that week is credited. Saturday cut-off is 11:00 for same-day collection. Happy to walk procurement through it. — Priya</div>
        <div style={{ display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }}><span style={{ display: 'inline-flex', alignItems: 'center', gap: 5, font: '500 11px var(--font-body)', color: 'var(--text-muted)' }}><Icon name="paperclip" size={12} />SLA_Northwind_2026.pdf</span><span style={{ flex: 1 }} />{!sent && <><Button size="sm" variant="outline" style={{ height: 28, fontSize: 12, padding: '0 10px' }}>Edit</Button><Button size="sm" iconLeft="send" onClick={() => setSent(true)} style={{ height: 28, fontSize: 12, padding: '0 10px' }}>Approve & send</Button></>}{sent && <button onClick={() => setSent(false)} style={{ border: 0, background: 'none', font: '500 11px var(--font-body)', color: 'var(--yk-violet)', cursor: 'pointer' }}>Undo</button>}</div>
      </div>
    </div>
  );
}

function PaneSMS() {
  const msgs = [
    [0, 'Northwind: Priya from our sales team will call you Wed at 11:00 about your cold-chain quote. Reply 1 to confirm or 2 to reschedule.', 'Tue 15:30'],
    [1, '1', '15:34'],
    [0, 'Confirmed for Wed 11:00. If you need a different time, reply with a day and time.', '15:34'],
    [1, 'Can we make it 11:30?', '15:41'],
    [0, 'Updated to Wed 11:30. Priya has been notified.', '15:41'],
  ];
  const n = useStepper(msgs.length, 1100, 'sms');
  return (
    <div style={{ display: 'flex', justifyContent: 'center', height: '100%' }}>
      <div style={{ width: 'min(100%, 300px)', border: '1px solid var(--border-default)', borderRadius: 20, overflow: 'hidden', display: 'grid', gridTemplateRows: 'auto 1fr', background: '#fff' }}>
        <div style={{ textAlign: 'center', padding: '8px 0 6px', borderBottom: '1px solid #EEF1F7' }}><div style={{ font: '600 12px var(--font-body)', color: 'var(--yk-indigo)' }}>NWFRGT</div><MonoLabel style={{ fontSize: 9.5 }}>SMS · automated reminders</MonoLabel></div>
        <div style={{ padding: 10, display: 'flex', flexDirection: 'column', gap: 6, justifyContent: 'flex-end', overflow: 'hidden' }}>
          {msgs.slice(0, n).map(([me, t, tm]) => <Bubble key={t} me={!!me} tint="var(--yk-violet)" meta={<MonoLabel style={{ fontSize: 9.5 }} color={me ? '#E9E7FF' : 'var(--text-subtle)'}>{tm}{me ? ' · Delivered' : ''}</MonoLabel>}>{me ? <span style={{ color: '#fff' }}>{t}</span> : t}</Bubble>)}
        </div>
      </div>
    </div>
  );
}

const OMNI_PANES = { voice: PaneVoice, chat: PaneChat, wa: PaneWhatsApp, email: PaneEmail, sms: PaneSMS };

function OmniThread() {
  const { Icon, Badge } = DS;
  const [k, setK] = React.useState('voice');
  const narrow = useMedia('(max-width: 720px)');
  const Pane = OMNI_PANES[k];
  return (
    <div style={{ background: '#fff', border: '1px solid var(--border-default)', borderRadius: 12, boxShadow: 'var(--shadow-md)', overflow: 'hidden', minWidth: 0 }}>
      <div style={{ display: 'flex', alignItems: 'center', gap: 10, padding: '10px 12px', borderBottom: '1px solid var(--border-default)' }}>
        <span style={{ width: 30, height: 30, borderRadius: '50%', background: 'var(--yk-indigo)', color: '#fff', display: 'grid', placeItems: 'center', font: '600 11px var(--font-body)', flex: 'none' }}>AM</span>
        <div style={{ minWidth: 0, flex: 1 }}><div style={{ font: '600 12.5px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>Anita Menon · Medline Clinics</div><MonoLabel style={{ fontSize: 10.5, display: 'block', overflow: 'hidden', textOverflow: 'ellipsis' }}>#C-1042 · 5 channels · 1 record</MonoLabel></div>
        <Badge size="sm" tone="violet">Qualified</Badge>
      </div>
      <div style={{ display: 'grid', gridTemplateColumns: narrow ? 'minmax(0,1fr)' : '196px minmax(0,1fr)', minHeight: 0 }}>
        <div style={{ borderRight: narrow ? 0 : '1px solid var(--border-default)', borderBottom: narrow ? '1px solid var(--border-default)' : 0, background: '#FAFBFE', display: narrow ? 'flex' : 'block', overflowX: narrow ? 'auto' : 'visible', padding: narrow ? 6 : '6px 0' }}>
          {OMNI_EVENTS.map((e, i) => { const on = e.k === k; return (
            <button key={e.k} type="button" onClick={() => setK(e.k)} style={{ display: 'grid', gridTemplateColumns: '26px minmax(0,1fr)', gap: 9, alignItems: 'center', width: narrow ? 'auto' : '100%', flex: 'none', textAlign: 'left', padding: '9px 12px', border: 0, background: on ? '#fff' : 'transparent', boxShadow: on ? (narrow ? 'inset 0 -2px 0 var(--yk-violet)' : 'inset 2px 0 0 var(--yk-violet)') : 'none', cursor: 'pointer', position: 'relative' }}>
              {!narrow && i < OMNI_EVENTS.length - 1 && <span aria-hidden style={{ position: 'absolute', left: 24.5, top: 35, height: 22, width: 1, background: 'var(--border-default)' }} />}
              <span style={{ width: 26, height: 26, borderRadius: 7, display: 'grid', placeItems: 'center', background: on ? 'var(--yk-violet)' : '#fff', color: on ? '#fff' : 'var(--yk-violet)', border: on ? 0 : '1px solid var(--border-default)', position: 'relative' }}><Icon name={e.icon} size={13} /></span>
              <span style={{ minWidth: 0 }}>
                <span style={{ display: 'flex', gap: 6, alignItems: 'baseline' }}><span style={{ font: '600 12px var(--font-body)', color: 'var(--yk-indigo)', whiteSpace: 'nowrap' }}>{e.ch}</span>{!narrow && <MonoLabel style={{ fontSize: 9.5, marginLeft: 'auto' }}>{e.ts}</MonoLabel>}</span>
                {!narrow && <span style={{ display: 'block', font: '400 11px var(--font-body)', color: 'var(--text-muted)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{e.sub} · {e.by}</span>}
              </span>
            </button>); })}
        </div>
        <div key={k} style={{ padding: 12, minWidth: 0, height: narrow && k === 'voice' ? 'auto' : (narrow ? 440 : 412), overflow: 'hidden', animation: 'yk-fade-up .35s cubic-bezier(.22,1,.36,1) both' }}><Pane /></div>
      </div>
    </div>
  );
}

Object.assign(window, { OmniThread });
