/*
 * 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 = ["M2.673 10.758a1.4 1.4 0 0 1 .093.234c.127.442.012.932-.362 1.212-.441.332-1.075.246-1.349-.233a8 8 0 1 1 14.014-.225c-.259.488-.889.594-1.341.277-.382-.269-.513-.755-.4-1.2a1.3 1.3 0 0 1 .085-.238 6 6 0 1 0-10.74.173m2.464-1.862a1.8 1.8 0 0 1 .076.404c.03.415-.096.831-.43 1.078-.444.328-1.08.237-1.314-.264a5 5 0 0 1-.24-.62l-.004-.011a5 5 0 1 1 9.574-.08l-.003.011q-.095.32-.23.625c-.226.504-.861.606-1.31.285-.338-.241-.47-.654-.448-1.07a1.7 1.7 0 0 1 .07-.405 3 3 0 0 0-.216-2.233 3 3 0 0 0-5.525 2.28M8 7a1 1 0 0 1 1 1v3.586l2.707 2.707a1 1 0 0 1-1.414 1.414L8 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L7 11.586V8a1 1 0 0 1 1-1"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M2.01 10.758a8 8 0 0 0 1.01 3.204l.02.035q.05.087.084.178c.163.44.054.951-.33 1.239-.435.328-1.059.242-1.342-.224a10 10 0 0 1-.221-.383 10 10 0 1 1 17.48.106c-.269.474-.89.58-1.335.267-.392-.275-.518-.783-.37-1.228a1 1 0 0 1 .078-.18l.019-.036A8.026 8.026 0 1 0 2.01 10.758m4.272.772a1.5 1.5 0 0 1 .091.32c.07.425-.052.87-.402 1.128-.44.325-1.068.235-1.316-.252a6 6 0 1 1 10.734-.09c-.24.492-.867.593-1.312.275-.354-.253-.483-.695-.42-1.122a1.5 1.5 0 0 1 .085-.321 4.021 4.021 0 0 0-5.87-4.878 4.02 4.02 0 0 0-1.59 4.94m4.712 2.583A1 1 0 0 0 11 14v-4a1 1 0 1 0-2 0v4q0 .057.006.113l-3.753 4.223a1 1 0 0 0 1.494 1.328L10 16.005l3.252 3.66a1 1 0 1 0 1.495-1.33z"] as readonly string[];

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