import { forwardRef } from 'react';
import { Button, Stack } from '@chakra-ui/react';
import { If } from '~/components';
import { useConfig, useGlobalState } from '~/context';
import { useBooleanValue } from '~/hooks';
import { TitleOnly } from './titleOnly';
import { SubtitleOnly } from './subtitleOnly';
import { Logo } from './logo';
import type { TTitle, TTextOnly } from './types';
const TextOnly = (props: TTextOnly) => {
const { showSubtitle, ...rest } = props;
const textAlign = useBooleanValue(
showSubtitle,
{ base: 'right', md: 'center' },
{ base: 'left', md: 'center' },
);
return (
);
};
const LogoSubtitle = () => (
<>
>
);
const All = (props: TTextOnly) => {
const { showSubtitle, ...rest } = props;
return (
<>
>
);
};
export const Title = forwardRef((props, ref) => {
const { web } = useConfig();
const titleMode = web.text.title_mode;
const { isSubmitting } = useGlobalState();
const justify = useBooleanValue(
isSubmitting.value,
{ base: 'flex-end', md: 'center' },
{ base: 'flex-start', md: 'center' },
);
return (
);
});