<script lang="ts">
  let { value }: { value: unknown } = $props()

  function format(val: unknown): string {
    if (!val) return '—'
    try {
      return new Date(String(val)).toLocaleString()
    } catch {
      return String(val)
    }
  }
</script>

<span class="text-xs text-muted-foreground">{format(value)}</span>
