/*
 * 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";

/** Path data for the 16px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_16 = ["M0 2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4h3V4L9.854 2.854A.5.5 0 0 1 10.207 2h3.586a.5.5 0 0 1 .353.854L13 4v2c1.833 1 4.4 3.6 0 6l1.488 1.488a.3.3 0 0 1-.212.512h-.982a.53.53 0 0 1-.444-.253c-.898-1.423-2.854-3.06-4.701-.004a.52.52 0 0 1-.443.257h-.412a.53.53 0 0 1-.444-.253c-.898-1.423-2.854-3.06-4.701-.004a.52.52 0 0 1-.443.257H0zm1 5h3V2H1zm6 0V2H5v5zm-2.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0-1a.5.5 0 1 1 0-1 .5.5 0 0 1 0 1m7.5-.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m-1 0a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M9.988 2a1 1 0 0 1 .999 1v4h3.995V5l-1.145-1.146A.5.5 0 0 1 14.19 3h3.581a.5.5 0 0 1 .353.854L16.979 5v2c2.996 1.333 4.494 4 .999 7l1.145 1.146a.5.5 0 0 1-.353.854h-2.496a.53.53 0 0 1-.444-.252c-.925-1.433-3.111-3.084-5.687.058a.52.52 0 0 1-.399.194h-.488a.53.53 0 0 1-.42-.218c-1.061-1.429-3.359-3.043-5.684.008a.52.52 0 0 1-.412.21H1V3a1 1 0 0 1 .998-1zm-6.99 2-.001 5h2.996V4zM8.99 4H6.992v5H8.99zM5.993 19a2 2 0 0 1-1.997-2 1.999 1.999 0 1 1 3.995 0 2 2 0 0 1-1.998 2m0-1a1.001 1.001 0 1 0 .063-2.001A1.001 1.001 0 0 0 5.993 18m6.991 1a2 2 0 0 1-1.997-2 1.999 1.999 0 1 1 3.995 0 2 2 0 0 1-1.998 2m0-1a1.001 1.001 0 0 0 .392-1.932 1.001 1.001 0 0 0-1.079 1.628 1 1 0 0 0 .687.304"] as readonly string[];

export const Locomotive: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
    const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
    const paths = isLarge ? PATHS_20 : PATHS_16;
    return (
        <SVGIconContainer iconName="locomotive" ref={ref} {...props}>
            {paths.map((d, i) => (
                <path key={i} d={d} fillRule="evenodd" />
            ))}
        </SVGIconContainer>
    );
});
Locomotive.displayName = `Blueprint6.Icon.Locomotive`;
export default Locomotive;
