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

function IconLogComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Log${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : 'none'} viewBox="0 0 24 24" {...rest} ref={ref}><path fill={useCurrentColor ? 'currentColor' : '#6C7587'} fillRule="evenodd" d="M6 1.5a3 3 0 0 0-3 3v15a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3V9l-7.5-7.5H6Z" clipRule="evenodd"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M15.6 14.052c.267 0 .507.053.72.16.21.105.389.262.537.47.004.006.012.01.02.01a.024.024 0 0 0 .022-.02l.05-.29a.3.3 0 0 1 .296-.25h.455a.3.3 0 0 1 .3.3v4.076c0 .416-.083.765-.248 1.048-.16.283-.403.496-.728.64-.325.15-.728.224-1.208.224a6.25 6.25 0 0 1-.864-.056 3.514 3.514 0 0 1-.573-.132.285.285 0 0 1-.195-.274v-.298c0-.214.217-.36.422-.298l.122.034c.187.053.376.09.568.112.197.027.395.04.592.04.31 0 .539-.083.688-.248.155-.165.232-.413.232-.744v-.088c0-.09.003-.184.008-.28a6.82 6.82 0 0 0 .022-.235.02.02 0 0 0-.036-.012 1.345 1.345 0 0 1-.53.487 1.587 1.587 0 0 1-.704.152c-.517 0-.923-.197-1.216-.592-.288-.4-.432-.955-.432-1.664 0-.48.067-.888.2-1.224.133-.341.325-.6.576-.776.256-.181.557-.272.904-.272Zm.376.968a.737.737 0 0 0-.472.152.888.888 0 0 0-.28.44 2.539 2.539 0 0 0-.088.728c0 .437.07.765.208.984.139.213.355.32.648.32.155 0 .288-.019.4-.056a.606.606 0 0 0 .272-.2.978.978 0 0 0 .168-.368c.037-.15.056-.33.056-.544v-.144c0-.315-.032-.568-.096-.76a.757.757 0 0 0-.296-.416.907.907 0 0 0-.52-.136Zm-3.173 1.288c0 .363-.05.685-.152.968a1.937 1.937 0 0 1-.424.72 1.787 1.787 0 0 1-.664.44 2.563 2.563 0 0 1-.888.144 2.44 2.44 0 0 1-.848-.144 1.878 1.878 0 0 1-.664-.44 2.124 2.124 0 0 1-.44-.72 2.859 2.859 0 0 1-.152-.968c0-.485.085-.893.256-1.224.17-.336.416-.592.736-.768.32-.176.699-.264 1.136-.264.41 0 .773.088 1.088.264.315.176.563.432.744.768.181.33.272.739.272 1.224Zm-3.016 0c0 .288.03.53.088.728a.885.885 0 0 0 .296.44.87.87 0 0 0 .52.144c.213 0 .384-.048.512-.144a.84.84 0 0 0 .288-.44c.064-.197.096-.44.096-.728s-.032-.528-.096-.72a.797.797 0 0 0-.288-.432.87.87 0 0 0-.52-.144c-.315 0-.544.11-.688.328-.139.213-.208.536-.208.968ZM7.192 18.2a.3.3 0 0 1-.3.3H6.3a.3.3 0 0 1-.3-.3v-5.48a.3.3 0 0 1 .3-.3h.592a.3.3 0 0 1 .3.3v5.48Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} fillRule="evenodd" d="M10.093 5.193a.66.66 0 0 0-.934 0L6.143 8.21A.487.487 0 0 0 6 8.554V9.5a.5.5 0 0 0 .5.5h.946a.483.483 0 0 0 .344-.143l3.017-3.016a.66.66 0 0 0 0-.934l-.714-.714Z" clipRule="evenodd" opacity=".7"/><path fill={useCurrentColor ? 'currentColor' : '#B5BAC3'} d="M13.5 1.5 21 9h-4.5a3 3 0 0 1-3-3V1.5Z"/><path fill={useCurrentColor ? 'currentColor' : '#fff'} d="M11.2 8.7a.3.3 0 0 1 .3.3v.7a.3.3 0 0 1-.3.3H9.3a.3.3 0 0 1-.3-.3c0-.034.013-.066.037-.09l.847-.847a.216.216 0 0 1 .153-.063H11.2Z" opacity=".5"/></svg>;
}

const IconLog = React.forwardRef(IconLogComponent);
export default IconLog;
