import type { ReactNode } from "react";

/* The two-column layout of the Publisher Hub sign-in pages (the design's .login section). */
export function HubShell({ eyebrow, title, accent, lede, children, wide = false, note }: { eyebrow: string; title: string; accent: string; lede: string; children: ReactNode; wide?: boolean; note?: ReactNode }) {
  return (
    <section className="login">
      <div className={`mz-wrap login__wrap${wide ? " login__wrap--wide" : ""}`}>
        <div className="login__side">
          <p className="eyebrow eyebrow--caps">{eyebrow}</p>
          <h1>
            {title} <span className="grad">{accent}</span>
          </h1>
          <p className="login__lede">{lede}</p>
          <ul className="login__list">
            <li>
              <span className="ico">
                <svg className="mz-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
                  <path d="M14 3.5H7.5a1.5 1.5 0 0 0-1.5 1.5v14a1.5 1.5 0 0 0 1.5 1.5h9a1.5 1.5 0 0 0 1.5-1.5V8L14 3.5Z" />
                  <path d="M14 3.5V8h4M9 13h6M9 16.5h4" />
                </svg>
              </span>
              <span>
                <strong>Applications</strong>
                The applications you have submitted for your properties.
              </span>
            </li>
            <li>
              <span className="ico">
                <svg className="mz-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
                  <path d="m5.5 12.5 4.5 4.5 8.5-9.5" />
                </svg>
              </span>
              <span>
                <strong>Status</strong>
                Where each application is in review and onboarding.
              </span>
            </li>
            <li>
              <span className="ico">
                <svg className="mz-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
                  <path d="M4 13v-1a8 8 0 0 1 16 0v1" />
                  <rect x="3" y="13" width="4" height="6" rx="1.5" />
                  <rect x="17" y="13" width="4" height="6" rx="1.5" />
                </svg>
              </span>
              <span>
                <strong>Support</strong>
                Messages with publisher support.
              </span>
            </li>
          </ul>
          {note ? <p className="login__side-note">{note}</p> : null}
        </div>
        <div className="login__card">{children}</div>
      </div>
    </section>
  );
}
