import type { ReactNode } from 'react';
import styles from './LiveRegion.module.css';

interface LiveRegionProps {
  children: ReactNode;
  politeness?: 'polite' | 'assertive';
}

export function LiveRegion({ children, politeness = 'polite' }: LiveRegionProps) {
  return (
    <span className={styles.region} role="status" aria-live={politeness} aria-atomic="true">
      {children}
    </span>
  );
}
