/*
 * 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 Cog: 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="cog" ref={ref} {...props}>
            <path
                d={isLarge ? "M380 240H333.8C331 249.2 327.2000000000001 257.8 322.6 266L356.6 300A19.92 19.92 0 0 1 356.6 328.2L328.4000000000001 356.4A19.92 19.92 0 0 1 300.2000000000001 356.4L266.2000000000001 322.4C258.0000000000001 326.8 249.4000000000001 330.6 240.2000000000001 333.4V380C240.2000000000001 391 231.2000000000001 400 220.2000000000001 400H180C169 400 160 391 160 380V333.4C150.4 330.6 141.2 326.6 132.6 321.8L100 354.4A19.4 19.4 0 0 1 72.8 354.4L45.6 327.2C38.2 319.6 38.2 307.4 45.6 300L78 267.6C73.2 258.8 69.2 249.8 66.2 240H20C9 240 0 231 0 220V180C0 169 9 160 20 160H66.2C69 150.8 72.8 142.2 77.4 134L43.4 100A19.92 19.92 0 0 1 43.4 71.8L71.6 43.6C79.4 35.8 92 35.8 99.8 43.6L133.8 77.6C142 73.2 150.6 69.4 159.8 66.6V20C159.8 9 168.8 0 179.8 0H219.8C230.8 0 239.8 9 239.8 20V66.6C249.4 69.4 258.6 73.6 267.2 78.4L300 45.6C307.4 38.2 319.6 38.2 327.2 45.6L354.4 72.8C361.8 80.2 361.8 92.4 354.4 100L322 132.4C326.8 141 331 150.2000000000001 334 160H380C391 160 400 169 400 180V220C400 231 391 240 380 240M200 120C155.8 120 120 155.8 120 200S155.8 280 200 280S280 244.2 280 200S244.2 120 200 120" : "M303.8 192.2H266.8C264.6 199.6 261.4 206.4 257.8 213L285 240.2C291.2 246.4000000000001 291.2 256.6 285 262.8L262.4000000000001 285.4A16.06 16.06 0 0 1 239.8000000000001 285.4L212.6000000000001 258.2C206.0000000000001 261.6 199.2000000000001 264.8 191.8000000000001 267V304.2C191.8000000000001 313 184.6000000000001 320.2 175.8000000000001 320.2H143.8000000000001C135.0000000000001 320.2 127.8000000000001 313 127.8000000000001 304.2V267C120.0000000000001 264.6 112.8000000000001 261.4 105.8000000000001 257.6L79.8000000000001 283.6C73.8000000000001 289.6 64.0000000000001 289.6 58.0000000000001 283.6L36.4 261.8C30.4 255.8 30.4 246 36.4 240L62.4 214C58.4 207.2 55.2 200 52.8 192.2H15.8C7 192.2 -0.2 185 -0.2 176.2V144.2C-0.2 135.4 7 128.2 15.8 128.2H52.8C55 120.8 58.2 114 61.8 107.4L34.6 80.2000000000001C28.4 74 28.4 63.8 34.6 57.6L57.2 35.0000000000001C63.4 28.8000000000001 73.6 28.8000000000001 79.8 35.0000000000001L107 62.2000000000001C113.6 58.6000000000001 120.4 55.6000000000001 127.8 53.4000000000001V16.2000000000001C127.8 7.4000000000001 135 0.2 143.8 0.2H175.8C184.6 0.2 191.8000000000001 7.4 191.8000000000001 16.2000000000001V53.4000000000001C199.6000000000001 55.8000000000001 206.8000000000001 59.0000000000001 213.8 62.8000000000001L239.8000000000001 36.8000000000001C245.8000000000001 30.8000000000001 255.6 30.8000000000001 261.6 36.8000000000001L283.4000000000001 58.6000000000001C289.4000000000001 64.6000000000001 289.4000000000001 74.4 283.4000000000001 80.4000000000001L257.4000000000001 106.4000000000001C261.2 113.4000000000001 264.6 120.6000000000001 267 128.4000000000001H304C312.8 128.4000000000001 320 135.6000000000001 320 144.4000000000001V176.4000000000001A16.32 16.32 0 0 1 303.8 192.2000000000001M159.8 100.2000000000001C126.6 100.2000000000001 99.8 127.0000000000001 99.8 160.2000000000001S126.6 220.2000000000001 159.8 220.2000000000001S219.8 193.4000000000001 219.8 160.2000000000001S193 100.2000000000001 159.8 100.2000000000001"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Cog.displayName = `Blueprint6.Icon.Cog`;
export default Cog;
