/*
 * 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 Rig: 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="rig" ref={ref} {...props}>
            <path
                d={isLarge ? "M140 316C140 285 166.8 260 200 260S260 289.2 260 316C260 371 218.8 400 200 400H120C120 345.2 195.2 360.8 140 316M374.2000000000001 34.2L260 148.2V219.8C260 230.8 251 239.8 240 239.8H160C149 239.8 140 230.8 140 219.8V148.2L25.8 34.2A20.06 20.06 0 0 1 54.2 5.8L140 91.6V20C140 9 149 0 160 0H240C251 0 260 9 260 20V91.6L345.8 5.8A20.06 20.06 0 0 1 374.2000000000001 34.2M204.2 240C204.4 240 204.4 239.8 204.2 240C204.4 239.8 204.4 240 204.2 240" : "M114.2 260C114.2 238 133.4 220 157 220C180.8 220 200 240.8 200 260C200 299.2 170.6 320 157.2 320H100C100 280.8 153.6 292 114.2 260M164.2 200L164.4 199.8S164.4 200 164.2 200M294.2000000000001 34.2L200 128.2V180C200 191 191 200 180 200H140C129 200 120 191 120 180V128.4L25.8 34.4C22.2 30.6 20 25.6 20 19.9999999999999A20.06 20.06 0 0 1 54.2 5.8L120 71.6V20C120 9 129 0 140 0H180C191 0 200 9 200 20V71.6L265.8 5.8A20.06 20.06 0 0 1 294.2 34.2"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Rig.displayName = `Blueprint6.Icon.Rig`;
export default Rig;
