import { selectClasses } from "@mui/material";
import React from "react";
import { Checkbox } from "../../../../Checkbox";

export const ChannelCheckbox = ({
  checked = false,
  onChange,
  id,
  className = "channel-checkbox-input",
  disabled = false,
  handleChatSelect,
  selectedChat,
  ...props
}) => {
  return (
    <div className="channel-checkbox" onClick={(e) => e.stopPropagation()}>
      <Checkbox
        checked={selectedChat?.includes(id)}
        label=""
        onChange={(e) => {
          e.stopPropagation();
          handleChatSelect(id);
        }}
        variant="default"
      />
    </div>
  );
};
