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

function IconComputerComponent(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 || 'hkgai';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-computer${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 18" fill="none" {...rest} ref={ref}><path d="M12.857 15.714a.714.714 0 01-.714-.714v-2.438H7.857V15a.714.714 0 01-.714.714.714.714 0 000 1.429h5.714a.714.714 0 000-1.429z" fill={useCurrentColor ? 'currentColor' : 'url(#svg_e855972ea9__paint0_linear_896:213788)'}/><path d="M12.143 13.095H7.857V15h4.286v-1.905z" fill={useCurrentColor ? 'currentColor' : 'url(#svg_e855972ea9__paint1_linear_896:213788)'}/><path d="M1.143 0h17.714A1.143 1.143 0 0120 1.143v12a.667.667 0 01-.667.666H1.143A1.142 1.142 0 010 12.668V1.143A1.143 1.143 0 011.143 0z" fill={useCurrentColor ? 'currentColor' : '#FDAF42'}/><path d="M0 11.429v1.714a1.143 1.143 0 001.143 1.143h17.714A1.143 1.143 0 0020 13.143v-1.714H0z" fill={useCurrentColor ? 'currentColor' : 'url(#svg_e855972ea9__paint2_linear_896:213788)'}/><defs><linearGradient id="svg_e855972ea9__paint0_linear_896:213788" x1="10" y1="17.71" x2="10" y2="11.31" gradientUnits="userSpaceOnUse"><stop stopColor="#273A9B"/><stop offset=".56" stopColor="#202F65"/><stop offset="1" stopColor="#021E2F"/></linearGradient><linearGradient id="svg_e855972ea9__paint1_linear_896:213788" x1="7.857" y1="98.657" x2="8.718" y2="85.181" gradientUnits="userSpaceOnUse"><stop stopColor="#273A9B"/><stop offset=".56" stopColor="#202F65"/><stop offset="1" stopColor="#021E2F"/></linearGradient><linearGradient id="svg_e855972ea9__paint2_linear_896:213788" x1="0" y1="120.229" x2=".409" y2="66.365" gradientUnits="userSpaceOnUse"><stop stopColor="#273A9B"/><stop offset=".56" stopColor="#202F65"/><stop offset="1" stopColor="#021E2F"/></linearGradient></defs></svg>;
}

const IconComputer = React.forwardRef(IconComputerComponent);
export default IconComputer;
