{{/*
  Time Breakdown Partial - ShadCN-style grid

  Usage: {{ partial "time-breakdown.html" (dict "data" $metrics.response_time) }}

  Parameters:
    - data: Object with avg_hours, median_hours, p90_hours, p95_hours

  Note: Values >= 24 hours are automatically displayed as days (e.g., "2d" instead of "48h")
*/}}

{{ $data := .data }}

<div class="grid grid-cols-4 gap-4">
  <div class="text-center">
    <div class="text-xl font-bold">{{ partial "format-hours.html" $data.avg_hours }}</div>
    <div class="text-xs font-medium text-base-content/60">Average</div>
  </div>
  <div class="text-center">
    <div class="text-xl font-bold">{{ partial "format-hours.html" $data.median_hours }}</div>
    <div class="text-xs font-medium text-base-content/60">Median</div>
  </div>
  <div class="text-center">
    <div class="text-xl font-bold">{{ partial "format-hours.html" $data.p90_hours }}</div>
    <div class="text-xs font-medium text-base-content/60">P90</div>
  </div>
  <div class="text-center">
    <div class="text-xl font-bold">{{ partial "format-hours.html" $data.p95_hours }}</div>
    <div class="text-xs font-medium text-base-content/60">P95</div>
  </div>
</div>
