import VisibilityOffOutlined from '@mui/icons-material/VisibilityOffOutlined'
import VisibilityOutlined from '@mui/icons-material/VisibilityOutlined'
import {
Box,
Button,
FormControl,
FormHelperText,
FormLabel,
IconButton,
Input,
Link,
Typography,
} from '@mui/joy'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { authButtonSx, authInputSx } from './authStyles'
const labelSx = { fontSize: '0.875rem', fontWeight: 600, mb: 0.75 }
export const AuthField = ({ children, error, helper, label, ...formProps }) => (
{label}
{children}
{(error || helper) && (
{error || helper}
)}
)
export const AuthTextField = ({ error, helper, label, sx, ...inputProps }) => (
)
export const AuthPasswordField = ({
error,
helper,
label,
sx,
...inputProps
}) => {
const { t } = useTranslation('auth')
const [visible, setVisible] = useState(false)
return (
setVisible(v => !v)}
sx={{ borderRadius: '8px' }}
>
{visible ? (
) : (
)}
}
{...inputProps}
/>
)
}
export const AuthSubmitButton = ({ children, sx, ...props }) => (
)
export const SocialButton = ({ children, icon, sx, ...props }) => (
)
export const AuthDivider = ({ children }) => {
const { t } = useTranslation('auth')
return (
{children ?? t('or')}
)
}
export const LegalLinks = () => (
Privacy Policy
{' ยท '}
Terms of Use
)