import React from 'react'; import { cn } from '../../shared/utils'; /** * Shared frame for every non-map state. * * Each state inherits the container's border, radius and height so that the * layout never shifts when a map turns into an empty result or an error — the * same contract the existing loading and missing-key states already honored. */ export interface MapStateFrameProps { height: string; className?: string; tone?: 'neutral' | 'destructive'; children?: React.ReactNode; } export const MapStateFrame = React.forwardRef< HTMLDivElement, MapStateFrameProps & React.HTMLAttributes >(({ height, className, tone = 'neutral', children, ...props }, ref) => (
{children}
)); MapStateFrame.displayName = 'MapStateFrame'; /** Skeleton shown while the Maps script is still loading. */ export const MapLoadingState = React.forwardRef< HTMLDivElement, { height: string; className?: string } & React.HTMLAttributes >(({ height, className, ...props }, ref) => (
)); MapLoadingState.displayName = 'MapLoadingState'; export interface MapMessageStateProps { title: string; hint?: string; icon: React.ReactNode; tone?: 'neutral' | 'destructive'; } /** Icon + title + hint, the shape shared by the error, empty and denied states. */ export function MapMessageState({ title, hint, icon, tone = 'neutral' }: MapMessageStateProps) { return (
{icon}

{title}

{hint ?

{hint}

: null}
); } /* -------------------------------------------------------------------------- */ /* Icons */ /* -------------------------------------------------------------------------- */ export function MapWarningIcon() { return ( ); } export function MapPinIcon({ className = 'w-8 h-8' }: { className?: string }) { return ( ); } export function MapEmptyIcon() { return ( ); } export function MapDeniedIcon() { return ( ); }