import type { Handle, RemixNode } from 'remix/ui' import { css } from 'remix/ui' import { routes } from '../routes.ts' export interface DocumentProps { children?: RemixNode head?: RemixNode title?: string } const DEFAULT_TITLE = readAppDisplayName('%%RMX_APP_DISPLAY_NAME_URI_COMPONENT%%') export function Document(handle: Handle) { return () => { let { children, head, title = DEFAULT_TITLE } = handle.props return ( {title} {head} {children} ) } } function readAppDisplayName(value: string): string { return value.startsWith('%%') ? 'Remix App' : decodeURIComponent(value) }