import type { ReactNode, ReactElement } from 'react'; /** * Per-feature SVG icon paths. Each feature gets a unique icon within its group. * All paths render inside a shared 24x24 viewBox with stroke="currentColor". */ const FEATURE_ICON_PATHS: Record = { // ── Properties in the area ─────────────────── 'Last known price': ( <> ), 'Estimated current price': ( <> ), 'Estimated price': ( <> ), 'Price per sqm': ( <> ), 'Est. price per sqm': ( <> ), 'Total floor area (sqm)': ( <> ), 'Interior height (m)': ( <> ), 'Number of bedrooms & living rooms': ( <> ), 'Estimated monthly rent': ( <> ), 'Date of last transaction': ( <> ), 'Construction year': ( <> ), 'Leasehold/Freehold': ( <> ), 'Property type': ( <> ), 'Current energy rating': ( <> ), 'Potential energy rating': ( <> ), 'Street tree density percentile': ( <> ), 'Within conservation area': ( <> ), 'Listed building': ( <> ), // ── Transport ──────────────────────────────── 'Travel time to nearest train or tube station (min)': ( <> ), // ── Education ──────────────────────────────── 'Education, Skills and Training Score': ( <> ), 'Good+ primary schools within 5km': ( <> ), 'Good+ secondary schools within 5km': ( <> ), 'Outstanding primary schools within 5km': ( <> ), 'Outstanding secondary schools within 5km': ( <> ), 'Good+ primary schools within 2km': ( <> ), 'Good+ secondary schools within 2km': ( <> ), 'Outstanding primary schools within 2km': ( <> ), 'Outstanding secondary schools within 2km': ( <> ), // ── Area development ───────────────────────── 'Income Score': ( <> ), 'Employment Score': ( <> ), 'Health Deprivation and Disability Score': ( <> ), 'Housing Conditions Score': ( <> ), 'Air Quality and Road Safety Score': ( <> ), // ── Crime summary ──────────────────────────── 'Serious crime (avg/yr)': ( <> ), 'Minor crime (avg/yr)': ( <> ), // ── Crime ──────────────────────────────────── 'Anti-social behaviour (avg/yr)': ( <> ), 'Violence and sexual offences (avg/yr)': ( <> ), 'Criminal damage and arson (avg/yr)': ( <> ), 'Burglary (avg/yr)': ( <> ), 'Vehicle crime (avg/yr)': ( <> ), 'Robbery (avg/yr)': ( <> ), 'Other theft (avg/yr)': ( <> ), 'Shoplifting (avg/yr)': ( <> ), 'Drugs (avg/yr)': ( <> ), 'Possession of weapons (avg/yr)': ( <> ), 'Public order (avg/yr)': ( <> ), 'Bicycle theft (avg/yr)': ( <> ), 'Theft from the person (avg/yr)': ( <> ), 'Other crime (avg/yr)': ( <> ), // ── Neighbours ─────────────────────────────── '% White': ( <> ), '% South Asian': ( <> ), '% East/SE Asian': ( <> ), '% Black': ( <> ), '% Mixed': ( <> ), '% Other': ( <> ), // ── Environment ────────────────────────────── 'Noise (dB)': ( <> ), 'Max available download speed (Mbps)': ( <> ), }; /** * Returns a complete SVG icon element for a given feature name, or null if unmapped. */ export function getFeatureIcon(featureName: string, className: string): ReactElement | null { const paths = FEATURE_ICON_PATHS[featureName]; if (!paths) return null; return ( {paths} ); }