/*
 * 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 = ["M1.722 1.111A1 1 0 0 1 3.064.425L5.99 1.596a1 1 0 0 1 .523 1.376L6 4 3 3 2 8h3l-2.237 2.11a.94.94 0 0 1-.948.221C.782 9.973.045 9.424.002 8.124A1 1 0 0 1 .03 7.88zM14.22 6a1 1 0 0 1 .97.757l.5 2A1 1 0 0 1 14.72 10H8a1 1 0 0 1-1-1V5.303a1 1 0 0 1 .168-.555l1.535-2.303A1 1 0 0 1 9.535 2H12a1 1 0 0 1 1 1v3zm-3.89-2L9 6h2V4zM5.5 11h8a2.5 2.5 0 0 1 0 5h-8a2.5 2.5 0 0 1 0-5m0 2a.5.5 0 0 0 0 1h8a.5.5 0 0 0 0-1z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["m19.16 9.804.6 2A1 1 0 0 1 18.78 13H9a1 1 0 0 1-1-1V9.272a1 1 0 0 1 .139-.506L9.76 6l.94-1.6a1 1 0 0 1 .8-.4H15a1 1 0 0 1 1 1v4h2.18a1 1 0 0 1 .98.804M10 9h4V6h-2.24zM4.25.5l4.739 2.494a.998.998 0 0 1 .383 1.449L9 5 4 2.994 2 10h4l-2.642 2.642a.95.95 0 0 1-.857.27C.952 12.595 0 11.94 0 10l2.658-8.861C2.837.544 3.695.222 4.25.5M3 17a3 3 0 0 1 3-3h11a3 3 0 0 1 0 6H6a3 3 0 0 1-3-3m2 0a1 1 0 0 0 1 1h11a1 1 0 0 0 0-2H6a1 1 0 0 0-1 1"] as readonly string[];

export const Excavator: 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="excavator" ref={ref} {...props}>
            {paths.map((d, i) => (
                <path key={i} d={d} fillRule="evenodd" />
            ))}
        </SVGIconContainer>
    );
});
Excavator.displayName = `Blueprint6.Icon.Excavator`;
export default Excavator;
