import type { QuoteComparativeView } from '~/types/quote-view-model' import { useLocalStorageRef } from '~/utils/useLocalStorageRef' const KEY = 'policy-ui-quote-session-v1' function defaultView(): QuoteComparativeView { return { title: 'ANÁLISIS COMPARATIVO · VIDA UNIVERSAL', subtitle: 'Protección & Ahorro', tagline: 'Comparativa de aseguradoras — valores garantizados y proyectados. Prima mensual fija de referencia.', quoteDateIso: new Date().toISOString().slice(0, 10), validDays: 30, client: { name: 'María Claudia Piña Ríos', ageYears: 30, gender: 'Femenino', smoker: false, riskClass: 'Estándar', occupation: 'Administrativo' }, request: { sumAssuredUsd: 100_000, monthlyPremiumUsd: 75, annualPremiumUsd: 900, benefitTypeLabel: 'Opción B — Creciente', additionalCoverageLabel: 'No contratadas', initialDepositLabel: 'No aplica' }, carriers: [ { carrierName: 'ASSA COMPAÑÍA DE SEGUROS, S.A.', productName: 'ASSA Universal II', ratesLine: 'T. garantizada 3.5% · T. corriente 4.0%', sumAssuredUsd: 100_000, footnote: 'Vigente hasta edad 91', cells: [ { yearLabel: 'Año 10', ageLabel: '40', guaranteed: 8200, projected: 12400 }, { yearLabel: 'Año 20', ageLabel: '50', guaranteed: 15200, projected: 24100 }, { yearLabel: 'Año 30', ageLabel: '60', guaranteed: 21000, projected: 38900 }, { yearLabel: 'Edad 65', ageLabel: '65', guaranteed: 24500, projected: 36859 } ], highlightProjectedUsd: 36859, highlightNote: 'Valor proyectado a la edad de referencia' }, { carrierName: 'ASSA COMPAÑÍA DE SEGUROS, S.A.', productName: 'ASSA Vida Segura', ratesLine: 'T. garantizada 4.0% · T. corriente 4.0%', sumAssuredUsd: 100_000, footnote: 'Vence a los 70 años', cells: [ { yearLabel: 'Año 10', ageLabel: '40', guaranteed: 7800, projected: 11800 }, { yearLabel: 'Año 20', ageLabel: '50', guaranteed: 14100, projected: 22800 }, { yearLabel: 'Año 30', ageLabel: '60', guaranteed: 19800, projected: 35200 }, { yearLabel: 'Edad 65', ageLabel: '65', guaranteed: 22100, projected: 33100 } ], highlightProjectedUsd: 33100, highlightNote: 'Revisar vigencia del producto' } ], accumulatedPremiumsUsd: [9000, 18_000, 27_000, 31_500], advisorColumns: [ 'Retorno garantizado a los 65: comparar valores acumulados vs primas pagadas.', 'Protección de largo plazo: priorizar vigencia del seguro hasta edad avanzada.', 'Coberturas opcionales (cáncer, cardiovascular, etc.) no incluidas en esta cotización.' ] } } export function useQuoteSession() { const view = useLocalStorageRef(KEY, defaultView) function reset() { view.value = defaultView() } return { view, reset, defaultView } }