/*
 * 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 = ["M10.507 9.75v-3.5c0-.089.023-.171.051-.25h-7.55c-.176 0-.061-.824 0-1l.729-1.63c.06-.177.095-.37.27-.37h4.5V1.01c-.166-.003-.32-.01-.5-.01-2.72 0-4.036.402-4.036.402-.508.155-1.079.711-1.268 1.237L1.94 4.756H.887c-.483 0-.88.423-.88.939s.397.939.88.939h.376L1.008 7c-.034.685 0 1.436 0 2v5c0 .657.384 1 1 1s1-.343 1-1v-1h10v1c0 .657.383 1 1 1s1-.343 1-1v-3.5h-3.75a.75.75 0 0 1-.75-.75m-5.5.25h-2V8h2zM15.34.826a2.8 2.8 0 0 0-.932-.598q-.58-.24-1.445-.241-.67 0-1.213.228-.542.229-.926.636c-.384.407-.456.592-.598.963a3.5 3.5 0 0 0-.218 1.144V3h1.789c.003-.208.023-.405.069-.588q.074-.29.225-.506.153-.216.39-.345.239-.13.567-.13.488 0 .762.272.275.27.275.839.012.333-.116.555a1.7 1.7 0 0 1-.335.408 7 7 0 0 1-.452.37q-.243.185-.463.438a2.6 2.6 0 0 0-.384.611q-.165.358-.2.889V6h1.645v-.1q.048-.371.237-.618.189-.246.433-.438t.518-.383a2.4 2.4 0 0 0 .878-1.117q.153-.383.152-.975A2.24 2.24 0 0 0 15.34.826M12.007 7v2h2V7z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M13 11.988v-4H4v-1l1-3h6V2.003a36 36 0 0 0-1-.015c-3.593 0-5.332.488-5.332.488-.67.188-1.424.864-1.674 1.503l-.004.009H3l-1 3H1a1 1 0 1 0 0 2h.333l-.28.84-.053.16v7.5a1.5 1.5 0 1 0 3 0v-.5h12v.5a1.5 1.5 0 1 0 3 0v-4.5h-5a1 1 0 0 1-1-1m-8.5 1a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3M19.83 2.782a2.4 2.4 0 0 0-.592-.853q-.415-.396-1.09-.663Q17.47 1 16.457 1q-.785 0-1.418.253a3.2 3.2 0 0 0-1.084.703q-.449.45-.698 1.065t-.264 1.353h2.096q0-.369.085-.69t.264-.56.456-.383.663-.143q.57 0 .89.3.322.3.321.93.015.368-.135.614t-.392.45a9 9 0 0 1-.527.41 3.5 3.5 0 0 0-.542.485q-.256.28-.45.676-.191.397-.234.984v.614h1.924v-.519q.056-.409.278-.683.22-.273.506-.484a14 14 0 0 1 .606-.424q.32-.211.584-.512.264-.3.442-.724.178-.423.178-1.079 0-.395-.178-.854m-4.54 6.099v2.103h2.237V8.881z"] as readonly string[];

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