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

function IconPublishComponent(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-publish${loadingKls} ${className}`} width={width} height={height} xmlns="http://www.w3.org/2000/svg" fill={useCurrentColor ? 'currentColor' : '#000'} viewBox="0 0 24 24" {...rest} ref={ref}><path fillRule="evenodd" d="M2.5 8.501v-6.5a1 1 0 0 1 1.409-.913l.067.034 18.5 10a1 1 0 0 1 .07 1.718l-.07.041-18.5 10a1 1 0 0 1-1.473-.805l-.003-.075v-6.5a1 1 0 0 1 .234-.642l.059-.065 2.793-2.793L2.793 9.21a1 1 0 0 1-.29-.62L2.5 8.501Zm15.547 4.5H7.415L4.5 15.916v4.408l13.547-7.323ZM4.5 3.679v4.408l2.914 2.914h10.633L4.5 3.679Z" clipRule="evenodd"/></svg>;
}

const IconPublish = React.forwardRef(IconPublishComponent);
export default IconPublish;
