import { Dominio } from './indicadores.models'; import { GlobalApplied } from './indicadores-memory'; // Presentation policy only. Each indicator owns a stable selection and revision; // no global Apply can invalidate its figure or numeric snapshot. Omitting periodos // delegates to the existing backend contract for all reported semesters. const cacuSelections = new Map( ['cacu_eu13', 'ind1'].map(id => [id, Object.freeze({ tipo: 'semestre' as const, selection: Object.freeze({ mode: 'todos' as const }), revision: 0, })]), ); export function independentFigurePeriods(domain: Dominio, id: string) { return domain === 'cacu' && cacuSelections.has(id); } export function figureApplied(domain: Dominio, id: string, general: GlobalApplied): GlobalApplied { return domain === 'cacu' ? cacuSelections.get(id) ?? general : general; }