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

function IconBarPencilLineComponent(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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-BarPencilLine${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 32 32" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M28.7688 8.81794L23.1825 3.23294C22.7137 2.76427 22.0779 2.50098 21.415 2.50098C20.7521 2.50098 20.1163 2.76427 19.6475 3.23294L4.23251 18.6467C3.99957 18.8782 3.81488 19.1536 3.68914 19.457C3.56341 19.7604 3.49912 20.0858 3.50001 20.4142V26.0004C3.50001 26.6635 3.7634 27.2994 4.23224 27.7682C4.70108 28.2371 5.33697 28.5004 6.00001 28.5004H27C27.3978 28.5004 27.7794 28.3424 28.0607 28.0611C28.342 27.7798 28.5 27.3983 28.5 27.0004C28.5 26.6026 28.342 26.2211 28.0607 25.9398C27.7794 25.6585 27.3978 25.5004 27 25.5004H15.625L28.7688 12.3542C29.001 12.122 29.1853 11.8464 29.311 11.543C29.4367 11.2396 29.5014 10.9145 29.5014 10.5861C29.5014 10.2577 29.4367 9.9325 29.311 9.62912C29.1853 9.32574 29.001 9.0501 28.7688 8.81794ZM11.375 25.5004H6.50001V20.6254L17 10.1254L21.875 15.0004L11.375 25.5004ZM24 12.8754L19.125 8.00044L21.4175 5.70794L26.2925 10.5829L24 12.8754Z"/></svg>;
}

const IconBarPencilLine = React.forwardRef(IconBarPencilLineComponent);
export default IconBarPencilLine;
