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

function IconCardLineComponent(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-line${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 14 14" {...rest} ref={ref}><path d="M12.5254 4.02051C12.5251 3.09789 11.7763 2.34961 10.8535 2.34961H3.14648C2.22372 2.34961 1.47486 3.09789 1.47461 4.02051V10.3525C1.47482 11.2752 2.2237 12.0234 3.14648 12.0234H10.8535C11.7763 12.0234 12.5252 11.2752 12.5254 10.3525V4.02051ZM13.7246 10.3525C13.7244 11.938 12.439 13.2227 10.8535 13.2227H3.14648C1.561 13.2227 0.2756 11.938 0.275391 10.3525V4.02051C0.275639 2.43511 1.56102 1.15039 3.14648 1.15039H10.8535C12.439 1.15039 13.7244 2.43511 13.7246 4.02051V10.3525Z"/><path fillRule="evenodd" d="M7.29199 9.07064C7.36935 9.07064 7.44353 9.10137 7.49823 9.15607C7.55293 9.21076 7.58366 9.28495 7.58366 9.36231V9.94564C7.58366 10.023 7.55293 10.0972 7.49823 10.1519C7.44353 10.2066 7.36935 10.2373 7.29199 10.2373H3.20866C3.1313 10.2373 3.05712 10.2066 3.00242 10.1519C2.94772 10.0972 2.91699 10.023 2.91699 9.94564V9.36231C2.91699 9.28495 2.94772 9.21076 3.00242 9.15607C3.05712 9.10137 3.1313 9.07064 3.20866 9.07064H7.29199ZM5.25033 6.7373C5.32768 6.7373 5.40187 6.76803 5.45657 6.82273C5.51126 6.87743 5.54199 6.95162 5.54199 7.02897V7.6123C5.54199 7.68966 5.51126 7.76385 5.45657 7.81854C5.40187 7.87324 5.32768 7.90397 5.25033 7.90397H3.20866C3.1313 7.90397 3.05712 7.87324 3.00242 7.81854C2.94772 7.76385 2.91699 7.68966 2.91699 7.6123V7.02897C2.91699 6.95162 2.94772 6.87743 3.00242 6.82273C3.05712 6.76803 3.1313 6.7373 3.20866 6.7373H5.25033ZM10.792 4.1123C10.8693 4.1123 10.9435 4.14303 10.9982 4.19773C11.0529 4.25243 11.0837 4.32662 11.0837 4.40397V7.6123C11.0837 7.68966 11.0529 7.76385 10.9982 7.81854C10.9435 7.87324 10.8693 7.90397 10.792 7.90397H8.16699C8.08964 7.90397 8.01545 7.87324 7.96075 7.81854C7.90605 7.76385 7.87533 7.68966 7.87533 7.6123V4.40397C7.87533 4.32662 7.90605 4.25243 7.96075 4.19773C8.01545 4.14303 8.08964 4.1123 8.16699 4.1123H10.792ZM9.91699 5.27897H9.04199V6.7373H9.91699V5.27897Z" clipRule="evenodd"/></svg>;
}

const IconCardLine = React.forwardRef(IconCardLineComponent);
export default IconCardLine;
