/** Server-safe indicator option shape for pickers (no 'use client'); re-exported by components/controls/indicator-select.tsx. */ import type { IndicatorSummary } from './types'; export interface IndicatorOption { slug: string; name: string; short_name?: string | null; topic?: string | null; unit?: string | null; featured?: boolean | null; first_year?: number | null; last_year?: number | null; n_countries?: number | null; } export function toIndicatorOption(i: IndicatorSummary): IndicatorOption { return { slug: i.slug, name: i.name ?? i.slug, short_name: i.short_name, topic: i.topic, unit: i.unit, featured: i.featured, first_year: i.first_year, last_year: i.last_year, n_countries: i.n_countries }; }