'use client'
import * as React from 'react'
import { cn } from '../../../utils/cn'
import { OpenFrameWordmark, PoweredByFlamingo } from './auth-branding'
import { AuthBenefitsPanel } from './auth-benefits-panel'
export interface AuthShellProps {
/** Tab selector (Sign Up / Login) rendered above the form. */
tabs?: React.ReactNode
/** Main form content (Create Organization, Login, …). */
children: React.ReactNode
/** Marketing panel. Defaults to . */
benefits?: React.ReactNode
/** Pinned to the bottom-left of the form column on desktop only (e.g. "Back to Login"). */
footer?: React.ReactNode
className?: string
}
/**
* Responsive layout shell for the auth pages. Desktop shows a two-column split
* (form left, marketing right); tablet and mobile stack into a single centered
* column (tabs → form → benefits → powered-by). Content is top-aligned. The
* wordmark appears only in the desktop marketing column — narrow screens go
* without it (in the native mobile shell a top logo sat under the status bar
* and was clipped inconsistently across devices).
*
* `of-auth-shell` on the root is a stable hook for shell/consumer CSS (the
* native mobile shell pads it by the top safe-area inset).
*/
export function AuthShell({ tabs, children, benefits, footer, className }: AuthShellProps) {
const benefitsNode = benefits ??
return (
{/* Main column — form */}
{/* Full width on mobile; fixed 320px from tablet up (matches desktop) */}
{tabs &&
{tabs}
}
{children}
{/* Benefits + powered-by — narrow screens only */}
{/* Footer — pinned to the bottom-left of the column on desktop only */}
{footer &&
{footer}
}
{/* Marketing column — desktop only */}
)
}