import React, { ForwardedRef, useContext } from 'react';
import { OriginIconProps } from '../type';
import { Context } from '../context';

function IconRecordingComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = true, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-recording${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M6.60767 0.63089C6.53213 0.344583 6.12542 0.34555 6.05121 0.632213L5.97892 0.911604C5.87467 1.31437 5.56104 1.62947 5.15878 1.73562L4.88084 1.80897C4.59453 1.88453 4.5955 2.29126 4.88217 2.36545L5.15515 2.43611C5.55983 2.54085 5.87583 2.85685 5.98054 3.26151L6.05121 3.5345C6.12542 3.82116 6.53213 3.82212 6.60767 3.53582L6.68104 3.25788C6.78721 2.85561 7.10229 2.54201 7.50504 2.43776L7.78446 2.36545C8.07113 2.29126 8.07208 1.88453 7.78575 1.80897L7.50146 1.73394C7.10108 1.62828 6.78838 1.31559 6.68271 0.915208L6.60767 0.63089ZM12.0833 2.50002C9.78213 2.50002 7.91663 4.3655 7.91663 6.66669V10C7.91663 12.3012 9.78213 14.1667 12.0833 14.1667C14.3845 14.1667 16.25 12.3012 16.25 10V6.66669C16.25 4.3655 14.3845 2.50002 12.0833 2.50002ZM14.5833 10V6.66669C14.5833 5.28598 13.464 4.16669 12.0833 4.16669C10.7026 4.16669 9.58329 5.28598 9.58329 6.66669V10C9.58329 11.3807 10.7026 12.5 12.0833 12.5C13.464 12.5 14.5833 11.3807 14.5833 10ZM12.9166 17.0349C16.436 16.6224 19.1666 13.6301 19.1666 10V9.16669C19.1666 8.93656 18.9801 8.75002 18.75 8.75002H17.9166C17.6865 8.75002 17.5 8.93656 17.5 9.16669V10C17.5 12.9916 15.0748 15.4167 12.0833 15.4167C9.09175 15.4167 6.66663 12.9916 6.66663 10V9.16669C6.66663 8.93656 6.48008 8.75002 6.24996 8.75002H5.41663C5.18652 8.75002 4.99997 8.93656 4.99997 9.16669V10C4.99997 13.6301 7.73067 16.6224 11.25 17.0349V18.75C11.25 18.9801 11.4365 19.1667 11.6666 19.1667H12.5C12.7301 19.1667 12.9166 18.9801 12.9166 18.75V17.0349ZM3.32686 3.98997C3.43815 3.55997 4.04824 3.55852 4.16157 3.98799L4.27412 4.41447C4.43261 5.01502 4.90165 5.48406 5.50221 5.64256L5.92871 5.7551C6.35817 5.86844 6.35671 6.47852 5.92671 6.58981L5.50763 6.69831C4.90348 6.85469 4.43083 7.32506 4.2716 7.92848L4.16157 8.3454C4.04824 8.77485 3.43815 8.77339 3.32686 8.34339L3.22088 7.93394C3.06377 7.32694 2.58976 6.85294 1.98277 6.69581L1.57329 6.58981C1.14329 6.47852 1.14184 5.86844 1.57131 5.7551L1.98821 5.6451C2.59162 5.48585 3.06202 5.01323 3.21839 4.40905L3.32686 3.98997Z"/></svg>;
}

const IconRecording = React.forwardRef(IconRecordingComponent);
export default IconRecording;
