import { ButtonLink, Button } from '../../components/Button';
import { Card } from '../../components/Card';
import { EmptyState } from '../../components/EmptyState';
import { Icon } from '../../design/Icon';
import { useI18n } from '../../i18n/useI18n';
import { paths } from '../../app/routes';
import { writeErrorKey } from './accountWrites';
import styles from './PageStates.module.css';
/**
* The first snapshot pull (SPEC §15.6 "loading"): design-spec §3.6 hero `Loading` content, announced politely.
* `compact` drops the body line (account pages).
*/
export function LoadingCard({ compact = false }: { compact?: boolean }) {
const { t } = useI18n();
return (
{t('home_loading')}
{compact ? null :
{t('home_loading_body')}
}
);
}
/** A failed read of the snapshot with nothing to show yet (SPEC §15.6 "error, with retry"). */
export function LoadFailedCard({ error, onRetry }: { error: unknown; onRetry: () => void }) {
const { t } = useI18n();
return (
{t('web_accounts_load_failed')}
{t(writeErrorKey(error))}
} onClick={onRetry}>
{t('common_retry')}
);
}
/** An account id that is not (or no longer) in the snapshot. */
export function AccountNotFound() {
const { t } = useI18n();
return (
{t('web_not_found_action')}
}
/>
);
}