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

function IconPaperclipComponent(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-Paperclip${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="M26.2075 15.2929C26.3005 15.3858 26.3743 15.496 26.4246 15.6174C26.4749 15.7388 26.5008 15.869 26.5008 16.0004C26.5008 16.1318 26.4749 16.2619 26.4246 16.3833C26.3743 16.5047 26.3005 16.615 26.2075 16.7079L15.9513 26.9579C14.6383 28.2707 12.8576 29.0082 11.0008 29.0081C9.14412 29.0079 7.36348 28.2703 6.05066 26.9573C4.73784 25.6443 4.00037 23.8636 4.00049 22.0068C4.00061 20.1501 4.7383 18.3695 6.05129 17.0566L18.4588 4.46664C19.3962 3.52827 20.6679 3.0007 21.9943 3C23.3206 2.9993 24.5929 3.52551 25.5313 4.46289C26.4697 5.40026 26.9972 6.67201 26.9979 7.99836C26.9986 9.32471 26.4724 10.597 25.535 11.5354L13.125 24.1254C12.5615 24.689 11.7971 25.0056 11 25.0056C10.203 25.0056 9.43862 24.689 8.87504 24.1254C8.31145 23.5618 7.99483 22.7974 7.99483 22.0004C7.99483 21.2034 8.31145 20.439 8.87504 19.8754L19.2875 9.29789C19.3787 9.20058 19.4885 9.12251 19.6103 9.06826C19.7322 9.01401 19.8636 8.98468 19.997 8.982C20.1303 8.97931 20.2629 9.00333 20.3868 9.05263C20.5107 9.10194 20.6235 9.17553 20.7186 9.26908C20.8136 9.36264 20.889 9.47426 20.9403 9.59738C20.9915 9.7205 21.0177 9.85264 21.0171 9.98601C21.0165 10.1194 20.9893 10.2513 20.937 10.374C20.8847 10.4967 20.8084 10.6076 20.7125 10.7004L10.2988 21.2891C10.2055 21.3816 10.1314 21.4916 10.0807 21.6127C10.03 21.7339 10.0036 21.8638 10.003 21.9952C10.0025 22.1265 10.0279 22.2567 10.0777 22.3782C10.1274 22.4997 10.2007 22.6103 10.2932 22.7035C10.3857 22.7968 10.4956 22.8709 10.6168 22.9216C10.7379 22.9723 10.8678 22.9987 10.9992 22.9993C11.1305 22.9998 11.2607 22.9744 11.3822 22.9246C11.5038 22.8749 11.6143 22.8016 11.7075 22.7091L24.1163 10.1254C24.6799 9.56296 24.997 8.79969 24.9978 8.00348C24.9986 7.20727 24.6831 6.44335 24.1207 5.87976C23.5582 5.31618 22.795 4.9991 21.9988 4.99828C21.2025 4.99746 20.4386 5.31296 19.875 5.87539L7.47004 18.4604C7.00532 18.9244 6.63654 19.4753 6.38476 20.0818C6.13297 20.6883 6.00311 21.3385 6.00259 21.9952C6.00207 22.6518 6.1309 23.3022 6.38171 23.9091C6.63253 24.516 7.00044 25.0675 7.46441 25.5323C7.92839 25.997 8.47935 26.3658 9.08585 26.6175C9.69235 26.8693 10.3425 26.9992 10.9992 26.9997C11.6559 27.0002 12.3062 26.8714 12.9131 26.6206C13.52 26.3698 14.0716 26.0019 14.5363 25.5379L24.7938 15.2879C24.982 15.1012 25.2366 14.9968 25.5017 14.9977C25.7668 14.9987 26.0207 15.1048 26.2075 15.2929Z"/></svg>;
}

const IconPaperclip = React.forwardRef(IconPaperclipComponent);
export default IconPaperclip;
