${label}
${present ? 'Present' : 'Absent'}
${
'type' in d && d.type
? html`
${this.type === 'sadhesati' ? 'Current phase' : 'Type'}${d.type}
`
: nothing
}
${
d.severity
? html`
`
: nothing
}
${d.description ? html`${d.description}
` : nothing}
${this.renderEffects(d)}
${
d.remedies && d.remedies.length > 0
? html`
Remedies
${d.remedies.map((r) => html`- ${r}
`)}
`
: nothing
}
${
'exceptions' in d && d.exceptions && d.exceptions.length > 0
? html`
Exceptions
${d.exceptions.map((r) => html`- ${r}
`)}
`
: nothing
}
`;
}
private renderEffects(d: DoshaData) {
if (!d.effects) return nothing;
// Effects mix flat string fields (marriage, career...) with a nested map
// (Sadhesati effects.phases: { Rising, Peak, Setting }). Render both; the
// old string-only filter silently dropped the phase-specific effects, which
// are the substance of a Sade Sati reading.
const sections: unknown[] = [];
for (const [key, value] of Object.entries(
d.effects as Record