export type NotificationReadItem = {
  id: string | number;
  is_read?: boolean;
};

export function collectUnreadIds(items: NotificationReadItem[]): number[] {
  return items
    .filter((item) => !item.is_read)
    .map((item) => (typeof item.id === 'string' ? Number(item.id) : item.id))
    .filter((id) => Number.isFinite(id));
}
