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

function IconMusicComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-music${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 16 16" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M8.45781 3.983C8.45782 3.70304 8.63983 3.45798 8.90158 3.38553L12.4233 2.41061C12.6135 2.35798 12.8002 2.506 12.8002 2.70936L12.8002 4.2642C12.8002 4.54417 12.6181 4.78923 12.3564 4.86169L9.65526 5.60935L9.65525 10.9275L9.65526 10.9323C9.65526 12.4056 8.21024 13.5999 6.42773 13.5999C4.64521 13.5999 3.2002 12.4056 3.2002 10.9323C3.2002 9.45909 4.64521 8.26479 6.42773 8.26479C7.19693 8.26479 7.90329 8.48718 8.4578 8.85842V5.13878L8.45778 5.13468L8.45781 3.983Z"/></svg>;
}

const IconMusic = React.forwardRef(IconMusicComponent);
export default IconMusic;
