// __SDEFILE__ - This file is a dependency for the stand-alone environment import { Spinner } from 'shared/components/spinner.mjs' import Link from 'next/link' import { useTranslation } from 'next-i18next' import { CogIcon, FingerprintIcon as ControlIcon, NewsletterIcon, UnitsIcon, CompareIcon, LabelIcon, BioIcon, UserIcon, LeftIcon, OkIcon, NoIcon, } from 'shared/components/icons.mjs' const btnClasses = { dflt: 'btn w-full mt-2 btn-secondary ' + 'flex flex-row flex-nowrap items-center gap-4 py-4 h-auto ' + 'border border-secondary justify-start text-left bg-opacity-30', active: 'btn-ghost bg-secondary hover:bg-secondary ' + 'hover:bg-opacity-30 hover:border-secondary', inactive: 'hover:bg-opacity-20 hover:bg-secondary btn-ghost ' + 'border border-secondary hover:border hover:border-secondary', } export const NumberBullet = ({ nr, color = 'secondary' }) => ( {nr} ) export const BackToAccountButton = ({ loading = false }) => { const { t } = useTranslation(['account']) return ( {loading ? : } {t('yourAccount')} ) } export const Choice = ({ val, update, current, children, bool = false, boolChoices = { yes: , no: , }, }) => { const active = val === current return ( ) } export const DoneIcon = ({ href }) => ( ) export const TodoIcon = ({ href }) => ( ) const TopicIcon = (props) => { const Icon = props.href === '' || props.href === 'control' ? ControlIcon : icons[props.href] ? icons[props.href] : CogIcon return } const DoingIcon = ({ href }) => export const Icons = ({ done = [], todo = [], current = '' }) => (
{done.map((href) => ( ))} {todo.map((href) => ( ))}
) const icons = { newsletter: NewsletterIcon, units: UnitsIcon, compare: CompareIcon, username: LabelIcon, bio: BioIcon, img: UserIcon, } export const welcomeSteps = { 1: [''], 2: ['', 'newsletter', 'units'], 3: ['', 'newsletter', 'units', 'compare', 'username'], 4: ['', 'newsletter', 'units', 'compare', 'username', 'bio', 'img'], 5: [''], } export const DisplayRow = ({ title, children, keyWidth = 'w-24' }) => (
{title}
{children}
)