import { Capacitor } from '@capacitor/core' import { Box, Sheet, Typography } from '@mui/joy' import Logo from '../../Logo' /** * Full-height auth layout: edge-to-edge on phones, a centered surface card from * the `sm` breakpoint up. The route renders without a navbar, so the shell owns * its own safe-area padding (the top inset is already reserved by NavBar). */ const AuthShell = ({ action, children, footer, logoSize = 48, showLogo = !Capacitor.isNativePlatform(), subtitle, // In the app the user already came through the app icon and the Get Started // mark, so repeating it here is noise. On the web these routes are the first // thing a visitor sees — often on a self-hosted domain, and with no navbar — // so the mark is the only thing identifying the app. Views reached from an // emailed link override this to always show it. title, }) => { return ( {/* my:auto centers the column without the top-clipping that justify-content:center causes once the form outgrows the viewport. */} {action && ( {action} )} {/* Mark only: the wordmark sat at nearly the same size and weight as the title below it, so the two competed instead of forming a hierarchy. */} {showLogo && ( )} {title && ( {title} )} {subtitle && ( {subtitle} )} {children} {footer && {footer}} ) } export default AuthShell