// Instant dental consult now uses the same WhatsApp booking flow as emergency.

function InstantConsult() {
  React.useEffect(() => {
    window.navigate && window.navigate('/book?emergency=1');
  }, []);

  return (
    <PortalShell active="home" title="Emergency consultation" subtitle="Molara now sends the dentist WhatsApp link by email after confirmation.">
      <div style={{ padding: 32, maxWidth: 760, margin: '0 auto' }}>
        <div className="ml-card" style={{ padding: 36, textAlign: 'center' }}>
          <div style={{ width: 58, height: 58, borderRadius: 16, background: 'var(--blue-soft)', color: 'var(--blue-deep)', display: 'grid', placeItems: 'center', margin: '0 auto 18px' }}>
            <I.chat size={24}/>
          </div>
          <h2 style={{ fontSize: 28, marginBottom: 8 }}>Opening WhatsApp emergency booking...</h2>
          <p className="ml-muted" style={{ fontSize: 14, lineHeight: 1.6, margin: '0 auto 22px', maxWidth: 520 }}>
            Choose your emergency details, confirm payment, and your registered email will receive the dentist WhatsApp link.
          </p>
          <button onClick={() => window.navigate && window.navigate('/book?emergency=1')} className="ml-btn ml-btn--primary" style={{ margin: '0 auto' }}>
            Continue <I.arrowR size={14}/>
          </button>
        </div>
      </div>
    </PortalShell>
  );
}

window.InstantConsult = InstantConsult;
