import { Alert, AlertTitle, Snackbar } from '@mui/material' import type { LassoMessageUIProps } from './types' /** * Presentational counterpart of `LassoTools.Message` (`@carto/ps-react-maps`), * positioned by that render-props component. Auto-hides after 5 seconds via * MUI `Snackbar` (calls `onDismiss`, which removes the message from the store). */ export function LassoMessageUI({ message, onDismiss, AlertProps, SnackbarProps, }: LassoMessageUIProps) { return ( reason !== 'clickaway' && onDismiss()} // Stay in flow — the maps-side `LassoTools.Message` owns positioning. sx={{ position: 'static', transform: 'none' }} {...SnackbarProps} > {message.title} {message.content} ) }