import { useMemo } from 'react';
import classNames from 'classnames';
import { v4 } from 'uuid';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export var FcrMicrophoneIndicator = function FcrMicrophoneIndicator(_ref) {
  var _ref$size = _ref.size,
    size = _ref$size === void 0 ? 24 : _ref$size,
    _ref$voicePercent = _ref.voicePercent,
    voicePercent = _ref$voicePercent === void 0 ? 0 : _ref$voicePercent,
    defId = _ref.defId,
    _ref$iconColor = _ref.iconColor,
    iconColor = _ref$iconColor === void 0 ? 'var(--fcr_web_ui_scene_mainicon1)' : _ref$iconColor,
    _ref$iconActiveColor = _ref.iconActiveColor,
    iconActiveColor = _ref$iconActiveColor === void 0 ? 'var(--fcr_ui_scene_ramp_green6)' : _ref$iconActiveColor,
    className = _ref.className;
  var id = useMemo(function () {
    return defId || v4();
  }, [defId]);
  var cls = classNames('fcr-microphone', className);
  return /*#__PURE__*/_jsx("div", {
    className: cls,
    children: /*#__PURE__*/_jsxs("svg", {
      viewBox: "0 0 48 48",
      fill: "none",
      width: size,
      height: size,
      children: [/*#__PURE__*/_jsx("defs", {
        children: /*#__PURE__*/_jsxs("linearGradient", {
          x1: "0%",
          x2: "0%",
          y1: "0%",
          y2: "100%",
          id: id,
          children: [/*#__PURE__*/_jsx("stop", {
            stopColor: iconColor,
            offset: "0%"
          }), /*#__PURE__*/_jsx("stop", {
            stopColor: iconColor,
            offset: "".concat(100 - voicePercent, "%")
          }), /*#__PURE__*/_jsx("stop", {
            stopColor: iconActiveColor,
            offset: "".concat(100 - voicePercent, "%")
          }), /*#__PURE__*/_jsx("stop", {
            stopColor: iconActiveColor,
            offset: "100%"
          })]
        })
      }), /*#__PURE__*/_jsx("path", {
        fillRule: "evenodd",
        clipRule: "evenodd",
        d: "M16.4001 23.0001C16.4001 22.2269 15.7733 21.6001 15.0001 21.6001C14.2269 21.6001 13.6001 22.2269 13.6001 23.0001V26.0001C13.6001 31.7439 18.2563 36.4001 24.0001 36.4001C29.7439 36.4001 34.4001 31.7439 34.4001 26.0001V23.0001C34.4001 22.2269 33.7733 21.6001 33.0001 21.6001C32.2269 21.6001 31.6001 22.2269 31.6001 23.0001V26.0001C31.6001 30.1975 28.1975 33.6001 24.0001 33.6001C19.8027 33.6001 16.4001 30.1975 16.4001 26.0001V23.0001Z",
        fill: iconColor
      }), /*#__PURE__*/_jsx("path", {
        d: "M24 12C20.6863 12 18 14.6863 18 18V26C18 29.3137 20.6863 32 24 32C27.3137 32 30 29.3137 30 26V18C30 14.6863 27.3137 12 24 12Z",
        fill: "url(#".concat(id, ")")
      })]
    })
  });
};