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

function IconLarkComponent(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-Lark${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 14 14" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M0.583008 5.86609C0.58325 5.74579 0.727322 5.68447 0.814453 5.76843C2.94686 7.82945 5.50438 9.2718 8.43262 10.0614C9.1255 10.2485 9.81414 10.2375 10.4404 10.0536C10.0504 10.4309 9.6202 10.7673 9.15723 11.0575C7.92701 11.8279 6.50668 12.2342 5.0498 12.2343C3.51659 12.2343 2.03527 11.7883 0.763672 10.9432C0.652733 10.8703 0.585938 10.7446 0.585938 10.6083L0.583008 5.86609ZM11.9326 5.10046C12.4462 5.1005 12.9437 5.1898 13.416 5.36414C13.1483 5.68737 12.9249 6.04226 12.749 6.42566L11.9609 7.99597C11.3108 9.23889 9.99139 9.80043 8.60254 9.42468C7.82087 9.21381 7.05502 8.94858 6.31934 8.63464C6.82184 8.31444 7.29134 7.94044 7.71777 7.52039L8.9209 6.33093C9.72952 5.53816 10.799 5.10046 11.9326 5.10046ZM8.44238 1.98328C8.56605 1.98328 8.68073 2.03853 8.75684 2.13367C9.38942 2.92482 9.85389 3.8129 10.1377 4.77527C9.513 5.01785 8.93745 5.38933 8.45703 5.86023L7.44336 6.86023C6.41753 5.10829 5.07329 3.52555 3.50684 2.22546C3.4087 2.14302 3.46545 1.98338 3.59375 1.98328H8.44238Z"/></svg>;
}

const IconLark = React.forwardRef(IconLarkComponent);
export default IconLark;
