// Health: Google Play vitals (user-perceived crash and ANR rate per day against the bad behavior thresholds, worst
// devices, top issues) and App Store diagnostics (power and performance metrics, signatures, TestFlight crashes).
import type { UnifiedApp } from '../../lib/identity';
import { t } from '../../i18n';
import { ago, date, num, pct } from '../../lib/format';
import { type AppleHealth, healthSeries, type HealthSnapshot, isError, PLAY_THRESHOLDS, type PlayHealth, type Series } from '../../lib/model';
import { useRead } from '../../store';
import { Icon } from '../../ui/icons';
import { Bar, Card, Chip, Empty, ErrorFoot, Notice, Skeleton, Sparkline } from '../../ui/kit';
import { exportName, healthMd } from '../../lib/exports';
import { useExports } from '../../ui/Exports';
import { StoreReadNotice } from '../../ui/StoreError';
function Metric({ title, s }: { title: string; s: Series }) {
return (
{s.tone === 'bad' ? t('health.over') : s.tone === 'warn' ? t('health.near') : s.tone === 'ok' ? t('health.under') : t('common.unknown')}}>