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

function IconReadingListComponent(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-reading-list${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 48 48" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M40 2a2 2 0 012 2v40a2 2 0 01-2 2H8a2 2 0 01-2-2V4a2 2 0 012-2h32zm-2 4H10v36h28V6zm-4 24a1 1 0 011 1v2a1 1 0 01-1 1H14a1 1 0 01-1-1v-2a1 1 0 011-1h20zm0-8a1 1 0 011 1v2a1 1 0 01-1 1H14a1 1 0 01-1-1v-2a1 1 0 011-1h20zm-10-8a1 1 0 011 1v2a1 1 0 01-1 1H14a1 1 0 01-1-1v-2a1 1 0 011-1h10z"/></svg>;
}

const IconReadingList = React.forwardRef(IconReadingListComponent);
export default IconReadingList;
