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

function IconPencilSimpleComponent(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-PencilSimple${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 d="M17.9797 5.5108L14.4891 2.01939C14.344 1.87423 14.1717 1.75908 13.9821 1.68052C13.7925 1.60196 13.5892 1.56152 13.384 1.56152C13.1787 1.56152 12.9755 1.60196 12.7859 1.68052C12.5963 1.75908 12.424 1.87423 12.2789 2.01939L2.64532 11.6538C2.4997 11.7984 2.38424 11.9706 2.30565 12.1602C2.22707 12.3498 2.18691 12.5532 2.18751 12.7585V16.2499C2.18751 16.6643 2.35213 17.0617 2.64515 17.3547C2.93818 17.6477 3.33561 17.8124 3.75001 17.8124H7.24141C7.44668 17.8129 7.65001 17.7727 7.83963 17.6942C8.02926 17.6156 8.2014 17.5001 8.3461 17.3545L17.9797 7.72017C18.2726 7.42716 18.4372 7.02981 18.4372 6.61549C18.4372 6.20117 18.2726 5.80381 17.9797 5.5108ZM7.10938 15.9374H4.06251V12.8905L10.625 6.32799L13.6719 9.37486L7.10938 15.9374ZM15 8.04674L11.9531 4.99986L13.3859 3.56705L16.4328 6.61392L15 8.04674Z"/></svg>;
}

const IconPencilSimple = React.forwardRef(IconPencilSimpleComponent);
export default IconPencilSimple;
