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

function IconSingleMachineComponent(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 || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-single_machine${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 opacity=".4" fillRule="evenodd" clipRule="evenodd" d="M25.7578 18.6665V23.3332C25.7578 24.4377 24.8623 25.3332 23.7578 25.3332H8.24214C7.13757 25.3332 6.24214 24.4377 6.24214 23.3332V18.6665H4.66662C3.56205 18.6665 2.66663 19.5619 2.66663 20.6665V27.3332C2.66663 28.4377 3.56206 29.3332 4.66663 29.3332H27.3333C28.4379 29.3332 29.3333 28.4377 29.3333 27.3332V20.6665C29.3333 19.5619 28.4379 18.6665 27.3333 18.6665H25.7578Z"/><path fillRule="evenodd" clipRule="evenodd" d="M25.7578 10.1288V23.3337C25.7578 24.4382 24.8624 25.3337 23.7578 25.3337H8.24219C7.13762 25.3337 6.24219 24.4382 6.24219 23.3337V4.66699C6.24219 3.56242 7.13762 2.66699 8.24219 2.66699H18.4116C18.9495 2.66699 19.4646 2.88362 19.8409 3.26799L25.1871 8.72981C25.5529 9.10358 25.7578 9.60579 25.7578 10.1288ZM16.3516 11.2344C15.7993 11.2344 15.3516 11.6821 15.3516 12.2344V15.0344C15.3516 15.5867 15.7993 16.0344 16.3516 16.0344H23.9516C24.5038 16.0344 24.9516 15.5867 24.9516 15.0344V12.2344C24.9516 11.6821 24.5038 11.2344 23.9516 11.2344H16.3516Z"/></svg>;
}

const IconSingleMachine = React.forwardRef(IconSingleMachineComponent);
export default IconSingleMachine;
