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

function IconExtendedContextComponent(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-extended-context${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 24 24" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><g clipPath="url(#svg_636b989ee0__clip0_37269_1128009)"><path fill={useCurrentColor ? 'currentColor' : '#F6BB45'} d="M0 0H24V24H0z"/><g fill={useCurrentColor ? 'currentColor' : '#fff'}><path d="M17.8477 12C17.9074 12.0001 17.9646 12.0102 18.0195 12.0254C18.0448 12.0323 18.0698 12.039 18.0938 12.0488C18.1048 12.0534 18.1152 12.0593 18.126 12.0645C18.1502 12.076 18.1738 12.0882 18.1963 12.1025C18.2117 12.1124 18.2258 12.1237 18.2402 12.1348C18.2572 12.1477 18.2735 12.1613 18.2891 12.1758C18.2999 12.1859 18.3102 12.1962 18.3203 12.207C18.34 12.228 18.3582 12.25 18.375 12.2734C18.3808 12.2816 18.3871 12.2894 18.3926 12.2979C18.4089 12.323 18.4228 12.3496 18.4355 12.377C18.4403 12.3873 18.445 12.3976 18.4492 12.4082C18.4597 12.4341 18.4675 12.4608 18.4746 12.4883C18.4779 12.501 18.4819 12.5134 18.4844 12.5264C18.4922 12.5665 18.498 12.6079 18.498 12.6504L18.4971 15.1826C18.497 15.5415 18.2056 15.833 17.8467 15.833C17.4879 15.8328 17.1964 15.5414 17.1963 15.1826V14.2207L13.7197 17.6973H14.6826L14.8135 17.7109C15.1096 17.7715 15.3329 18.0336 15.333 18.3477C15.333 18.6617 15.1096 18.9237 14.8135 18.9844L14.6826 18.998H12.1504C11.7914 18.998 11.5 18.7066 11.5 18.3477V15.8154C11.5001 15.4566 11.7915 15.165 12.1504 15.165C12.5092 15.1651 12.8006 15.4566 12.8008 15.8154V16.7773L16.2764 13.3008H15.3154C14.9565 13.3008 14.6651 13.0093 14.665 12.6504C14.665 12.2914 14.9564 12 15.3154 12H17.8477Z"/><path d="M13.8721 5.00049C14.0181 5.00054 14.1583 5.05763 14.2627 5.15967L18.1328 8.93994C18.1859 8.99203 18.228 9.05493 18.2568 9.12354C18.2855 9.19226 18.2999 9.26681 18.2998 9.34131V10.8599C18.1782 10.8289 18.025 10.8005 17.8486 10.8003H15.3154C14.2937 10.8003 13.4648 11.6292 13.4648 12.6509C13.4651 13.1391 13.6563 13.5829 13.9658 13.9136L13.4141 14.4663C13.0833 14.1564 12.6392 13.9655 12.1504 13.9653C11.1284 13.9653 10.3005 14.7944 10.2998 15.8149V18.3481C10.2999 18.5776 10.3434 18.7967 10.4199 18.9995H6.26074C5.95101 18.9995 5.70047 18.7497 5.7002 18.4409V5.55908C5.70061 5.41107 5.7596 5.26923 5.86426 5.16455C5.96928 5.05969 6.11234 5.00052 6.26074 5.00049H13.8721ZM8.15039 11.8569C8.05786 11.857 7.9689 11.8942 7.90332 11.9595C7.83784 12.025 7.80009 12.114 7.7998 12.2065V12.9067C7.7998 13.0999 7.95728 13.2562 8.15039 13.2563H11.6494C11.8426 13.2563 12 13.0999 12 12.9067V12.2065C11.9997 12.1141 11.9628 12.0249 11.8975 11.9595C11.8318 11.8942 11.742 11.8569 11.6494 11.8569H8.15039ZM8.15039 8.35693C8.0577 8.35699 7.96893 8.394 7.90332 8.45947C7.83764 8.52516 7.79982 8.61464 7.7998 8.70752V9.40674C7.7998 9.59987 7.95728 9.75722 8.15039 9.75732H11.6494C11.8426 9.75732 12 9.59994 12 9.40674V8.70752C12 8.61464 11.9631 8.52516 11.8975 8.45947C11.8318 8.39384 11.7423 8.35693 11.6494 8.35693H8.15039Z"/></g></g><defs><clipPath id="svg_636b989ee0__clip0_37269_1128009"><rect width="24" height="24" rx="6" fill={useCurrentColor ? 'currentColor' : '#fff'}/></clipPath></defs></svg>;
}

const IconExtendedContext = React.forwardRef(IconExtendedContextComponent);
export default IconExtendedContext;
