hunk.code_window: name: Check PR title
   on:
     pull_request:
       types:
  
hunk.labels: replace keep keep keep
hunk.after_edit: name: Check PR title conventional commit
  
hunk.file_path: .github/workflows/conventional-pr-title.yml
hunk.type: replace
file: /* eslint-disable */
  "use client";
  import { MdMic, MdMicOff } from "react-icons/md";
  
  import Button from "@/lib/components/ui/Button";
  import { useSpeech } from "./hooks/useSpeech";
  
  type MicButtonProps = {
    setMessage: (newValue: string | ((prevValue: string) => string)) => void;
  };
  
  export const MicButton = ({ setMessage }: MicButtonProps): JSX.Element => {
    const { isListening, speechSupported, startListening } = useSpeech({
      setMessage,
    });
  
    return (
      <Button
        className="p-2 sm:px-3"
        variant={"tertiary"}
        type="button"
        onClick={startListening}
        disabled={!speechSupported}
        data-testid="mic-button"
      >
        {isListening ? (
          <MdMicOff className="text-lg sm:text-xl lg:text-2xl" />
        ) : (
          <MdMic className="text-lg sm:text-xl lg:text-2xl" />
        )}
      </Button>
    );
  };
  