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': ( <> ), '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': ( <> ), 'Asking price': ( <> ), 'Asking rent (monthly)': ( <> ), Bedrooms: ( <> ), Bathrooms: ( <> ), 'Listing date': ( <> ), 'Listing status': ( <> ), 'Leasehold/Freehold': ( <> ), 'Property type': ( <> ), 'Current energy rating': ( <> ), 'Potential energy rating': ( <> ), // ── Transport ──────────────────────────────── 'Train or tube stations within 1km': ( <> ), 'Distance to nearest train or tube station (km)': ( <> ), // ── Education ──────────────────────────────── 'Education, Skills and Training Score': ( <> ), 'Good+ primary schools within 5km': ( <> ), 'Good+ secondary schools within 5km': ( <> ), // ── Deprivation ────────────────────────────── 'Income Score (rate)': ( <> ), 'Employment Score (rate)': ( <> ), 'Health Deprivation and Disability Score': ( <> ), 'Living Environment Score': ( <> ), 'Indoors Sub-domain Score': ( <> ), 'Outdoors Sub-domain Score': ( <> ), // ── Crime summary ──────────────────────────── 'Serious crime (avg/yr)': ( <> ), 'Minor crime (avg/yr)': ( <> ), 'Serious crime per 1k residents (avg/yr)': ( <> ), 'Minor crime per 1k residents (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)': ( <> ), // ── Demographics ───────────────────────────── '% White': ( <> ), '% South Asian': ( <> ), '% East Asian': ( <> ), '% Black': ( <> ), '% Mixed': ( <> ), '% Other': ( <> ), // ── Amenities ──────────────────────────────── 'Number of restaurants within 2km': ( <> ), 'Number of grocery shops and supermarkets within 2km': ( <> ), 'Number of parks within 2km': ( <> ), // ── Environment ────────────────────────────── 'Noise (dB)': ( <> ), 'Max available download speed (Mbps)': ( <> ), 'Environmental risk': ( <> ), 'Collapsible deposits risk': ( <> ), 'Compressible ground risk': ( <> ), 'Landslide risk': ( <> ), 'Running sand risk': ( <> ), 'Shrink-swell risk': ( <> ), 'Soluble rocks risk': ( <> ), }; /** * 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} ); }