import type { TemplateResult } from 'lit'; /** * A graha placed inside a kundli cell. Render-only view model fed from a * `meta` map on the API response. Carries enough detail to draw a compact * in-cell label (abbreviation, whole degree, retrograde mark) and a rich SVG * `` tooltip (exact position, nakshatra, pada, avastha). */ export interface PlacedGraha { graha: string; longitude?: number; nakshatra?: { name?: string; pada?: number; lord?: string; }; isRetrograde?: boolean; awastha?: string; } /** * Unified view model used by every kundli style. Caller passes a graha-keyed * `meta` map (from `/vedic-astrology/birth-chart`, `/divisional-chart`, or * `/navamsa`) through {@link toKundliViewModel} to produce this shape. * * `placements` is keyed by lowercase rashi name (`"aries"`, `"taurus"`, ...) * so the sign-fixed styles can index directly. The Lagna entry is not * counted as a planet; it only flags the ascendant cell. */ export interface KundliViewModel { lagnaSign: string; placements: Record<string, PlacedGraha[]>; divisionLabel?: string; } /** * Kundli regional styles. Sign-fixed (south, east) and house-fixed (north). * Exposed so consumers can type their own `chart-style` attribute reflection. */ export type ChartStyle = 'south' | 'north' | 'east'; /** * Bucket a graha-keyed `meta` map (D1 birth chart or D2..D60 divisional * chart) into the unified {@link KundliViewModel} the renderer consumes. The * Lagna entry is recognised by `graha === 'Lagna'` (or key `"Lagna"`) and * sets `lagnaSign`; it is not bucketed as a placed planet. * * @param meta - Graha-keyed map; missing rashi entries are skipped. * @param divisionLabel - Optional title written inside the chart centre. * @param lagnaOverride - Optional rashi/sign name (case-insensitive, e.g. `"cancer"`) that replaces the `meta.Lagna`-derived ascendant. Drives the Chandra Lagna (Moon-as-ascendant) and other reference-point views: the `meta` of a `/birth-chart` response always carries the Janma Lagna as its `Lagna` key, so this is the only way to pivot the houses without a second request. Ignored when it does not resolve to a known sign. */ export declare function toKundliViewModel(meta: Record<string, { graha?: string; rashi?: string; longitude?: number; nakshatra?: { name?: string; pada?: number; lord?: string; }; isRetrograde?: boolean; awastha?: string; }>, divisionLabel?: string, lagnaOverride?: string): KundliViewModel; /** * Render the kundli body for the requested style. Returns the SVG inner * content; the caller wraps it in an `<svg>` element with the canonical * viewBox `0 0 400 400` and applies its own theming CSS. */ export declare function renderKundliSvg(vm: KundliViewModel, style: ChartStyle): TemplateResult; /** * Render a WAI-ARIA-compliant tablist that lets the end user switch between * South / North / East kundli styles at runtime. The hosting component owns * the `chartStyle` state; this helper renders the buttons and wires the * arrow-key navigation plus click handler. * * @param active - The currently selected style. * @param setStyle - Callback the host component uses to update its state. */ export declare function renderKundliStyleTablist(active: ChartStyle, setStyle: (next: ChartStyle) => void): TemplateResult; //# sourceMappingURL=kundli-render.d.ts.map