export function formatDuration(duration: string): string {
  // Handle HH:MM:SS or MM:SS formats
  const parts = duration.split(':').map(Number);
  if (parts.length === 3) {
    const [h, m] = parts;
    if (h > 0) return `${h}h ${m}m`;
    return `${m}m`;
  }
  if (parts.length === 2) {
    const [m] = parts;
    return `${m}m`;
  }
  return duration;
}
