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

function IconPlayComponent(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-Play${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M6.1543 5.24587C6.15463 4.47634 6.98777 3.99581 7.6543 4.38063L19.3516 11.1336C20.018 11.5185 20.0181 12.4811 19.3516 12.866L7.6543 19.6189C6.98764 20.0038 6.1543 19.5225 6.1543 18.7527V5.24587Z"/></svg>;
}

const IconPlay = React.forwardRef(IconPlayComponent);
export default IconPlay;
