import { useAppConfig } from "../AppConfig/AppConfig.tsx";

export function DocumentTitle(props: { children: string }) {
  const { children: children } = props;
  const { app, isDev } = useAppConfig();
  const itc = `${app.name} · Indie Tabletop Club`;
  const title = children ? `${children} | ${itc}` : itc;

  return <title>{isDev ? `[DEV] ${title}` : title}</title>;
}
