/*
 * 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.586 11a1 1 0 0 1 .707.293L13 13h2v2H1v-2h2l1.707-1.707A1 1 0 0 1 5.414 11zM8 8a1 1 0 1 1 0 2 1 1 0 0 1 0-2M5.2 6.153c1.07-1.428 4.238-1.628 5.568-.04.35.43.29 1.06-.13 1.41-.43.35-1.06.29-1.41-.13-.47-.57-2.11-.47-2.43-.04-.33.44-.96.53-1.4.2s-.529-.96-.199-1.4M2.302 4.278c3.12-3.039 8.278-3.039 11.387.01.4.38.4 1.01.02 1.41s-1.02.409-1.41.019c-2.339-2.289-6.258-2.289-8.598 0-.4.38-1.04.36-1.42-.03a.996.996 0 0 1 .02-1.41"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M13.238 14c.234 0 .46.082.64.232L16 16h2v2H2v-2h2l2.122-1.768a1 1 0 0 1 .64-.231zM10 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2M6.269 8.64c1.949-2.09 5.298-2.279 7.457-.01a1 1 0 0 1-.04 1.41c-.4.38-1.03.36-1.42-.03-1.33-1.4-3.349-1.29-4.538-.01a.997.997 0 1 1-1.459-1.36m3.733-5.636c2.699 0 5.298 1.3 6.797 3.4.1.2.2.4.2.6 0 .3-.1.6-.4.8-.5.399-1.1.299-1.4-.201-1.1-1.6-3.198-2.6-5.197-2.6-2.1 0-3.899.9-5.198 2.6-.3.5-1 .5-1.4.2-.5-.3-.499-1-.199-1.4 1.7-2.199 3.998-3.489 6.797-3.399"] as readonly string[];

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