/*
 * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import * as React from "react";
import type { SVGIconProps } from "../../svgIconProps";
import { IconSize } from "../../iconTypes";
import { SVGIconContainer } from "../../svgIconContainer";

export const Chat: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
    const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
    const pixelGridSize = isLarge ? IconSize.LARGE : IconSize.STANDARD;
    const translation = `${-1 * pixelGridSize / 0.05 / 2}`;
    const style = { transformOrigin: "center" };
    return (
        <SVGIconContainer iconName="chat" ref={ref} {...props}>
            <path
                d={isLarge ? "M380 400H140C129 400 120 391 120 380V180C120 169 129 160 140 160H251.8L326 85.8C329.4000000000001 82.2 334.4000000000001 80 340 80C351 80 360 89 360 100V160H380C391 160 400 169 400 180V380C400 391 391 400 380 400M140 140C118 140 100 158 100 180V320H20C9 320 0 311 0 300V100C0 89 9 80 20 80H40V20A20.06 20.06 0 0 1 74.2 5.8L148.2 80H260C271 80 280 89 280 100V103.4L243.4 140z" : "M120 120C98 120 80 138 80 160V260H20C9 260 0 251 0 240V80C0 69 9 60 20 60V20A20.06 20.06 0 0 1 54.2 5.8L108.2 60H200C211 60 220 69 220 80V103.4L203.4 120zM300 320H120C109 320 100 311 100 300V160C100 149 109 140 120 140H211.8L266 85.8C269.4000000000001 82.2 274.4000000000001 80 280 80C291 80 300 89 300 100V140C311 140 320 149 320 160V300C320 311 311 320 300 320"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Chat.displayName = `Blueprint6.Icon.Chat`;
export default Chat;
