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

function IconTextSelectionComponent(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 || 'font';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-Text_Selection${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 20 20" fill={useCurrentColor ? 'currentColor' : '#000'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path d="M4.11035 0.833008C5.03062 0.833184 5.77628 1.57971 5.77637 2.5C5.77637 3.09229 5.46652 3.61065 5.00098 3.90625V5H15.001C15.9213 5.00018 16.667 5.74663 16.667 6.66699V16.0586C17.1642 16.347 17.499 16.8838 17.499 17.5C17.499 18.4204 16.7533 19.1668 15.833 19.167C14.9125 19.167 14.166 18.4205 14.166 17.5C14.1661 16.8827 14.5022 16.3446 15.001 16.0566V15H5.00098C4.0805 15 3.33398 14.2535 3.33398 13.333V3.97461C2.8046 3.6954 2.44336 3.14011 2.44336 2.5C2.44345 1.5796 3.18993 0.833008 4.11035 0.833008ZM5.00098 13.333H15.001V6.66699H5.00098V13.333Z"/></svg>;
}

const IconTextSelection = React.forwardRef(IconTextSelectionComponent);
export default IconTextSelection;
