{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "author": "Lopifi (https://lopifi.com)",
  "categories": [
    "system-states",
    "finance",
    "accounting"
  ],
  "dependencies": [],
  "description": "Last-synced + retry.",
  "files": [
    {
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"@/lib/ledger/cn\";\nimport { AsOf } from \"@/components/ledger/as-of\";\nimport { ArrowPathIcon } from \"@/components/ledger/icons\";\n\nexport interface StaleIndicatorProps extends React.ComponentPropsWithoutRef<\"div\"> {\n  lastSynced: Date;\n  onRetry?: () => void;\n  timeZone?: string;\n}\n\n/**\n * Stale financial data presented as current is the most dangerous state in\n * the product. This component exists so that state is impossible to miss.\n */\nexport const StaleIndicator = React.forwardRef<HTMLDivElement, StaleIndicatorProps>(\n  ({ className, lastSynced, onRetry, timeZone, ...props }, ref) => (\n    <div\n      className={cn(\"inline-flex items-center gap-2 rounded-sm bg-warning-subtle px-2 py-1\", className)}\n      ref={ref}\n      role=\"status\"\n      {...props}\n    >\n      <span aria-hidden=\"true\" className=\"size-1.5 rounded-full bg-[var(--warning)]\" />\n      {/* The date carries the alarm; the clock time and zone are on hover. The\n          full stamp is the longest run of text in a strip that has to fit\n          inside a card, and it is the part nobody reads first. */}\n      <AsOf\n        className=\"text-caption text-text-secondary\"\n        compact\n        date={lastSynced}\n        prefix=\"Last synced\"\n        timeZone={timeZone}\n      />\n      {onRetry ? (\n        <button\n          className=\"inline-flex items-center gap-1 text-caption font-medium text-accent hover:underline\"\n          onClick={onRetry}\n          type=\"button\"\n        >\n          <ArrowPathIcon aria-hidden=\"true\" className=\"size-3\" />\n          Retry\n        </button>\n      ) : null}\n    </div>\n  ),\n);\nStaleIndicator.displayName = \"StaleIndicator\";\n",
      "path": "components/ledger/stale-indicator.tsx",
      "target": "components/ledger/stale-indicator.tsx",
      "type": "registry:component"
    }
  ],
  "meta": {
    "license": "MIT"
  },
  "name": "stale-indicator",
  "registryDependencies": [
    "@lopifi/theme",
    "@lopifi/as-of",
    "@lopifi/cn",
    "@lopifi/icons"
  ],
  "title": "StaleIndicator",
  "type": "registry:component"
}
