// Student theme: Dino Discovery branding, icons, greeting, top bar, and decorations.
const StxDinoFootprint = () => (
  <svg
    className="stx-dino-footprint"
    viewBox="0 0 24 24"
    width="22"
    height="22"
    fill="none"
    xmlns="http://www.w3.org/2000/svg"
    aria-hidden="true"
  >
    <ellipse cx="12" cy="16.5" rx="4.5" ry="3.5" fill="#ffffff"/>
    <ellipse cx="6.5" cy="8.5" rx="2.2" ry="3.5" transform="rotate(-22 6.5 8.5)" fill="#ffffff"/>
    <ellipse cx="12" cy="7" rx="2.4" ry="4" fill="#ffffff"/>
    <ellipse cx="17.5" cy="8.5" rx="2.2" ry="3.5" transform="rotate(22 17.5 8.5)" fill="#ffffff"/>
  </svg>
);

const StxDinoClawIcon = () => (
  <svg
    className="stx-dino-claw-icon"
    viewBox="0 0 36 32"
    width="32"
    height="28"
    fill="none"
    xmlns="http://www.w3.org/2000/svg"
    aria-hidden="true"
  >
    <g transform="translate(2, 6) rotate(-15 8 10)">
      <ellipse cx="8" cy="13" rx="3.5" ry="2.8" fill="#65a30d"/>
      <ellipse cx="3.8" cy="6.5" rx="1.6" ry="2.6" transform="rotate(-20 3.8 6.5)" fill="#65a30d"/>
      <ellipse cx="8" cy="5.2" rx="1.8" ry="3" fill="#65a30d"/>
      <ellipse cx="12.2" cy="6.5" rx="1.6" ry="2.6" transform="rotate(20 12.2 6.5)" fill="#65a30d"/>
    </g>
    <g transform="translate(18, 0) rotate(10 8 10)">
      <ellipse cx="8" cy="13" rx="3.5" ry="2.8" fill="#65a30d"/>
      <ellipse cx="3.8" cy="6.5" rx="1.6" ry="2.6" transform="rotate(-20 3.8 6.5)" fill="#65a30d"/>
      <ellipse cx="8" cy="5.2" rx="1.8" ry="3" fill="#65a30d"/>
      <ellipse cx="12.2" cy="6.5" rx="1.6" ry="2.6" transform="rotate(20 12.2 6.5)" fill="#65a30d"/>
    </g>
  </svg>
);

const StxDinoHeroGreeting = ({ name, level }) => (
  <div className="stx-dino-greeting">
    <div className="stx-dino-greeting-content">
      <h1 className="stx-page-title stx-dino-greeting-title">
        Hey {name},
        <br/>
        let’s learn!
      </h1>
      <p className="stx-dino-greeting-sub">Level {level} Explorer</p>
    </div>
  </div>
);

const StxDinoTopBar = ({ session, logout, student, loading, route, go }) => (
  <header className="stx-topbar stx-dino-topbar">
    <div className="stx-brand">
      <span className="stx-brand-tile stx-dino-brand-tile" aria-hidden="true">
        <StxDinoFootprint/>
      </span>
      <b>EpiqMinds</b>
      <StxChip className="stx-dino-chip">STUDENT</StxChip>
    </div>
    <StxNav placement="top" route={route} go={go}/>
    <div className="stx-dino-topbar-actions">
      {typeof NotificationBell !== "undefined" && (
        <div className="stx-dino-bell-wrapper">
          <NotificationBell session={session}/>
        </div>
      )}
      <StxAccountMenu
        session={session}
        logout={logout}
        student={student}
        loading={loading}
        route={route}
        go={go}
        compact
        triggerVariant="avatar"
      />
    </div>
  </header>
);

const StxDinoLeaf = () => (
  <svg viewBox="0 0 24 24" width="100%" height="100%" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path
      d="M12 2C6 6 4 14 12 22C20 14 18 6 12 2Z"
      fill="#65a30d"
      opacity="0.45"
    />
    <path d="M12 4V20" stroke="#3f6212" strokeWidth="1.2" opacity="0.5"/>
    <path d="M12 8L8 11M12 12L7 15M12 16L9 18M12 8L16 11M12 12L17 15M12 16L15 18" stroke="#3f6212" strokeWidth="1" opacity="0.4"/>
  </svg>
);

const StxDinoDecorations = () => (
  <div className="stx-dino-decorations" aria-hidden="true">
    <div className="stx-dino-leaf stx-leaf-1"><StxDinoLeaf/></div>
    <div className="stx-dino-leaf stx-leaf-2"><StxDinoLeaf/></div>
    <div className="stx-dino-leaf stx-leaf-3"><StxDinoLeaf/></div>
    <div className="stx-dino-leaf stx-leaf-4"><StxDinoLeaf/></div>
    <div className="stx-dino-leaf stx-leaf-5"><StxDinoLeaf/></div>
  </div>
);

Object.assign(window, {
  StxDinoFootprint,
  StxDinoClawIcon,
  StxDinoHeroGreeting,
  StxDinoTopBar,
  StxDinoDecorations,
});
