import { tr } from '../lib/i18n';
/** Screen chrome: a titled header pinned above a scrolling body. */
import type { ReactNode } from 'react';
import { cx } from '../lib/format';
import { Icon } from './ui';
export function Screen({ title, sub, actions, children, width = 'normal', bare, plainHeader, titleDetail, back, }: {
title: ReactNode;
sub?: ReactNode;
actions?: ReactNode;
children: ReactNode;
width?: 'normal' | 'tight' | 'wide' | 'full';
bare?: boolean;
plainHeader?: boolean;
titleDetail?: ReactNode;
/** A way back to the list this screen was opened from, shown before the title (as the chat's navbar shows its own title). */
back?: { label: string; onClick: () => void };
}) {
return (<>
{tr(sub)}{tr(title)}
{tr(titleDetail ? {tr(titleDetail)} : null)}