import clsx from "clsx";

import styles from "./OnlineIndicator.module.scss";

interface OnlineIndicatorProps {
  isOnline: boolean;
  className?: string;
  size?: "sm" | "md" | "lg";
}

export default function OnlineIndicator({
  isOnline,
  className,
  size = "md",
}: OnlineIndicatorProps) {
  return (
    <div
      className={clsx(
        styles.onlineIndicator,
        styles[size],
        isOnline ? styles.online : styles.offline,
        className
      )}
    />
  );
}
