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

function IconCardSurfaceComponent(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-card-surface${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 16 16" {...rest} ref={ref}><path d="M12.4043 2C13.8376 2.0002 14.999 3.16243 14.999 4.5957V11.8311C14.999 13.2643 13.8376 14.4266 12.4043 14.4268H3.59473C2.16141 14.4266 1.00001 13.2643 1 11.8311V4.5957C1 3.1624 2.1614 2.00015 3.59473 2H12.4043ZM3.66699 10.3672C3.57859 10.3672 3.49318 10.4023 3.43066 10.4648C3.36841 10.5273 3.33398 10.612 3.33398 10.7002V11.3672C3.33407 11.4554 3.36838 11.5401 3.43066 11.6025C3.49318 11.6651 3.57859 11.7002 3.66699 11.7002H8.33398C8.42221 11.7001 8.50694 11.6649 8.56934 11.6025C8.63172 11.5401 8.66691 11.4554 8.66699 11.3672V10.7002C8.66699 10.6119 8.6317 10.5273 8.56934 10.4648C8.50694 10.4024 8.42221 10.3673 8.33398 10.3672H3.66699ZM3.66699 7.7002C3.57859 7.7002 3.49318 7.73534 3.43066 7.79785C3.36838 7.86026 3.33407 7.94503 3.33398 8.0332V8.7002C3.33398 8.78841 3.36841 8.87307 3.43066 8.93555C3.49318 8.99806 3.57859 9.0332 3.66699 9.0332H6C6.08841 9.0332 6.17382 8.99806 6.23633 8.93555C6.29859 8.87307 6.33398 8.78841 6.33398 8.7002V8.0332C6.3339 7.94503 6.29861 7.86026 6.23633 7.79785C6.17382 7.73534 6.08841 7.7002 6 7.7002H3.66699ZM9.33398 4.7002C9.24558 4.7002 9.16017 4.73534 9.09766 4.79785C9.03527 4.86028 9.00009 4.94495 9 5.0332V8.7002C9 8.78849 9.0353 8.87306 9.09766 8.93555C9.16017 8.99806 9.24558 9.0332 9.33398 9.0332H12.334C12.4222 9.03307 12.5069 8.99794 12.5693 8.93555C12.6317 8.87306 12.667 8.78849 12.667 8.7002V5.0332C12.6669 4.94495 12.6317 4.86028 12.5693 4.79785C12.5069 4.73545 12.4222 4.70032 12.334 4.7002H9.33398ZM11.334 6.0332V7.7002H10.334V6.0332H11.334Z"/></svg>;
}

const IconCardSurface = React.forwardRef(IconCardSurfaceComponent);
export default IconCardSurface;
