import * as React from "react"; import { cn } from "@/lib/utils"; // ─── Types ──────────────────────────────────────────────────────────────────── export type LoanEntryShellProps = { /** * Hero image URL shown on the left panel (desktop only). * Falls back to a muted placeholder panel when omitted. */ heroSrc?: string; /** Alt text for the hero image. Pass "" when decorative. */ heroAlt?: string; /** Logo node — typically */ logo?: React.ReactNode; /** Screen heading */ title: string; /** Optional subtitle beneath the heading */ subtitle?: string; className?: string; children: React.ReactNode; }; // ─── Component ──────────────────────────────────────────────────────────────── /** * Two-column entry screen shell for the loan application flow. * * - Desktop (md+): left 50% = hero image, right 50% = logo + content * - Mobile ( {/* ── Left: hero panel (desktop only) ──────────────────────────────── */} {heroSrc ? ( // alt="" is sufficient for decorative images — no aria-hidden needed ) : ( )} {/* ── Right: content panel ─────────────────────────────────────────── */} {/* Logo — pinned to top-left */} {logo && {logo}} {/* Top-aligned content */} {/* Heading block */} {title} {subtitle && ( {subtitle} )} {/* Option cards / content */} {children} ); }
{subtitle}