import { useState } from "react";
import { Button } from "../button/button";
import microOn from "../../../images/icons/MicroOn.svg";
import { THOC } from "../../../utils/types";

export const MicroButton: React.FC<any> = ({ onClick, isMuted }) => {
  const button = {
    icon: microOn,
    active: "Включить микрофон",
    inactive: "Выключить микрофон",
    type: "microphone",
  };



  function handleClick() {
    onClick()
  }


  return (
    <div className="toolbar-button-area">
      <Button button={button} active={isMuted} onClick={handleClick}></Button>
    </div>
  );
};
