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

function IconYAMLComponent(props: OriginIconProps, ref: ForwardedRef<SVGSVGElement>) {
    const { prefix: prefixFromContext } = useContext(Context);
    const { className = '', prefix: prefixFromProps, width = '1em', height = '1em', useCurrentColor = false, spin, ...rest } = props;

    const prefix = prefixFromProps || prefixFromContext || 'hiagent';
    const loadingKls = spin ? ` ${prefix}-icon-loading` : '';
    return <svg className={`${prefix}-icon ${prefix}-icon-YAML${loadingKls} ${className}`} width={width} height={height} viewBox="0 0 18 18" fill={useCurrentColor ? 'currentColor' : 'none'} xmlns="http://www.w3.org/2000/svg" {...rest} ref={ref}><path fillRule="evenodd" clipRule="evenodd" d="M4.5 1.125C3.90326 1.125 3.33097 1.36205 2.90901 1.78401C2.48705 2.20597 2.25 2.77826 2.25 3.375V14.625C2.25 15.2217 2.48705 15.794 2.90901 16.216C3.33097 16.6379 3.90326 16.875 4.5 16.875H13.5C14.0967 16.875 14.669 16.6379 15.091 16.216C15.5129 15.794 15.75 15.2217 15.75 14.625V6.75L10.125 1.125H4.5Z" fill={useCurrentColor ? 'currentColor' : '#B0CA0C'}/><path d="M10.125 1.125L15.75 6.75H12.375C11.7783 6.75 11.206 6.51295 10.784 6.09099C10.3621 5.66903 10.125 5.09674 10.125 4.5V1.125Z" fill={useCurrentColor ? 'currentColor' : '#C6E11C'}/><path d="M6.70312 8.72949H6.31445C6.10977 8.72951 6.00709 8.78 5.95703 8.83789C5.90311 8.90093 5.85357 9.04611 5.85352 9.3252V10.0615C5.85352 10.3809 5.80586 10.6561 5.69629 10.8721L5.64551 10.9629C5.57244 11.0767 5.47657 11.1746 5.36426 11.25C5.47563 11.3254 5.57013 11.4211 5.64551 11.5381L5.69629 11.627C5.80593 11.8429 5.85347 12.1182 5.85352 12.4375V13.1738C5.85352 13.4527 5.90305 13.5991 5.95703 13.6621L5.97852 13.6836C6.03482 13.7324 6.136 13.7715 6.31445 13.7715H6.70312V14.7939H6.29199C5.79945 14.7939 5.39963 14.6965 5.12402 14.4717C4.83159 14.2344 4.71295 13.8236 4.71289 13.3057V12.5254C4.71287 12.3569 4.69798 12.2294 4.67383 12.1377L4.64648 12.0566C4.63172 12.0181 4.60952 11.983 4.58105 11.9531C4.55249 11.9231 4.51837 11.8984 4.48047 11.8818C4.39275 11.8436 4.25535 11.817 4.05859 11.8125L3.89355 11.8076V10.6914L4.05859 10.6875C4.26079 10.683 4.39889 10.6545 4.48438 10.6152C4.52214 10.5983 4.55666 10.5742 4.58496 10.5439C4.61319 10.5138 4.63497 10.4782 4.64941 10.4395C4.68764 10.345 4.71286 10.1943 4.71289 9.97461V9.19434C4.71292 8.67641 4.83115 8.26619 5.12305 8.02832C5.39922 7.80334 5.79928 7.70606 6.29199 7.70605H6.70312V8.72949ZM11.708 7.70605C12.2005 7.70611 12.6004 7.80342 12.876 8.02832C13.1684 8.26566 13.2861 8.67641 13.2861 9.19434V9.97461C13.2862 10.1943 13.3114 10.3455 13.3496 10.4395C13.3641 10.4782 13.3868 10.5137 13.415 10.5439C13.4432 10.574 13.477 10.5982 13.5146 10.6152C13.6001 10.6546 13.7389 10.683 13.9414 10.6875L14.1064 10.6914V11.8076L13.9414 11.8125C13.7447 11.817 13.6073 11.8436 13.5195 11.8818C13.4816 11.8984 13.4475 11.9231 13.4189 11.9531C13.3904 11.983 13.3673 12.018 13.3525 12.0566L13.3262 12.1367C13.3019 12.229 13.2861 12.3566 13.2861 12.5254V13.3057C13.2861 13.823 13.1678 14.2338 12.876 14.4717C12.6004 14.6966 12.2011 14.7939 11.708 14.7939H11.2969V13.7715H11.6846C11.8633 13.7715 11.9652 13.7319 12.0215 13.6836L12.042 13.6621C12.096 13.5991 12.1455 13.4528 12.1455 13.1738V12.4375C12.1456 12.1182 12.1937 11.8429 12.3027 11.627L12.3535 11.5371C12.4288 11.4208 12.5235 11.3253 12.6348 11.25C12.5224 11.1743 12.4265 11.0761 12.3535 10.9619L12.3037 10.8721C12.1941 10.6561 12.1455 10.3809 12.1455 10.0615V9.3252C12.1455 9.04649 12.096 8.90086 12.042 8.83789C11.9913 8.78006 11.8891 8.72949 11.6846 8.72949H11.2969V7.70605H11.708ZM5.69434 13.373L5.70117 13.4258C5.6947 13.3769 5.68965 13.3276 5.6875 13.2783L5.69434 13.373ZM7.4502 10.5996C7.80911 10.5997 8.09961 10.8911 8.09961 11.25C8.0996 11.6089 7.8091 11.9003 7.4502 11.9004C7.09122 11.9004 6.79982 11.609 6.7998 11.25C6.7998 10.891 7.09121 10.5996 7.4502 10.5996ZM9.15039 10.5996C9.5092 10.5998 9.7998 10.8911 9.7998 11.25C9.79979 11.6088 9.50919 11.9002 9.15039 11.9004C8.79141 11.9004 8.50001 11.609 8.5 11.25C8.5 10.891 8.79141 10.5996 9.15039 10.5996ZM10.8496 10.5996C11.2086 10.5996 11.5 10.891 11.5 11.25C11.5 11.609 11.2086 11.9004 10.8496 11.9004C10.4908 11.9002 10.2002 11.6089 10.2002 11.25C10.2002 10.8911 10.4908 10.5998 10.8496 10.5996ZM12.5918 10.9941L12.5977 11C12.5791 10.9806 12.5616 10.9596 12.5449 10.9385L12.5918 10.9941ZM12.3135 9.32617L12.3115 9.22168L12.3076 9.15137C12.3121 9.20537 12.3135 9.26377 12.3135 9.32617ZM12.8184 8.2041L12.8115 8.19629L12.7686 8.15918C12.7854 8.17268 12.8026 8.18835 12.8184 8.2041Z" fill={useCurrentColor ? 'currentColor' : '#fff'}/></svg>;
}

const IconYAML = React.forwardRef(IconYAMLComponent);
export default IconYAML;
