import type { Milestone } from '../types';
import { decodeRoutineStageDescription } from './routineMilestone';

/** 업무명(단계) 카드 — 부제목 (기간 대신 표시) */
export function getMilestoneSubtitle(m: Milestone): string {
  if (m.subtitle?.trim()) return m.subtitle.trim();
  const { overview } = decodeRoutineStageDescription(m.description);
  return overview;
}
