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

function IconSavedConditionsComponent(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-saved-conditions${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 fillRule="evenodd" d="M11 1c.368 0 .667.298.667.667v.666h1.667c.368 0 .666.299.666.667v11.333a.667.667 0 0 1-.666.667H2.667A.667.667 0 0 1 2 14.333V3c0-.368.299-.667.667-.667h1.667v-.666C4.334 1.298 4.632 1 5 1h6ZM4.334 3.667h-1v10h9.333v-10h-1v.666A.667.667 0 0 1 11 5H5a.667.667 0 0 1-.666-.667v-.666Zm6.097 3.43.472.472c.13.13.13.341 0 .471l-3.334 3.334a.333.333 0 0 1-.471 0l-2-2a.333.333 0 0 1 0-.472l.471-.471c.13-.13.341-.13.472 0l1.293 1.293L9.96 7.098c.13-.13.341-.13.471 0Zm-.097-4.764H5.667v1.334h4.667V2.333Z" clipRule="evenodd"/></svg>;
}

const IconSavedConditions = React.forwardRef(IconSavedConditionsComponent);
export default IconSavedConditions;
