/*
 * 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 GitCommit: 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="git-commit" ref={ref} {...props}>
            <path
                d={isLarge ? "M380 220H298A100 100 0 0 1 102 220H20C9 220 0 211 0 200S9 180 20 180H102A100 100 0 0 1 298 180H380C391 180 400 189 400 200S391 220 380 220M200 140C166.8 140 140 166.8 140 200S166.8 260 200 260S260 233.2 260 200S233.2 140 200 140" : "M300 180H237.2C228.2 214.4 197.2 240 160 240S91.8 214.4 82.8 180H20C9 180 0 171 0 160S9 140 20 140H82.8C91.8 105.6 122.8 80 160 80S228.2 105.6 237.2 140H300C311 140 320 149 320 160S311 180 300 180M160 120C138 120 120 138 120 160S138 200 160 200S200 182 200 160S182 120 160 120"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
GitCommit.displayName = `Blueprint6.Icon.GitCommit`;
export default GitCommit;
