/** * Story 3.2 — pure feature card model, sort, and filter (no DOM). */ import type { SutraGraph, HealthBand } from "../types.js"; export type CardHealth = "healthy" | "warn" | "unhealthy" | "unknown"; export type ContractStatus = "has_contract" | "none"; export interface FeatureCardModel { id: string; name: string; isAiName: boolean; aiSummary?: string; nodeCount: number; edgeCount: number; contractStatus: ContractStatus; issueCount: number; health: CardHealth; healthBand?: HealthBand; healthScore?: number; } export type SortKey = "health" | "issues" | "name"; export type SortDir = "asc" | "desc"; export declare function bandToCardHealth(band: HealthBand | undefined, hasHealthField: boolean): CardHealth; export declare function cardModel(graph: SutraGraph): FeatureCardModel[]; export declare function sortCards(models: FeatureCardModel[], key: SortKey, dir: SortDir): FeatureCardModel[]; /** Default: health worst-first. */ export declare function defaultSort(models: FeatureCardModel[]): FeatureCardModel[]; export declare function filterByHealth(models: FeatureCardModel[], states: CardHealth[]): FeatureCardModel[];