/*
 * 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 = ["M11.146.146a.5.5 0 0 1 .708 0l4 4a.5.5 0 0 1-.708.708l-.646-.647L13.207 5.5l1.647 1.646a.5.5 0 0 1-.708.708l-.646-.647-1.147 1.147-5.5 5.5a.5.5 0 0 1-.707 0l-.646-.647-1.646 1.647a.5.5 0 0 1-.708 0l-.646-.647-1.646 1.647a.5.5 0 0 1-.708-.708L1.793 13.5l-.647-.646a.5.5 0 0 1 0-.708L2.793 10.5l-.647-.646a.5.5 0 0 1 0-.708l5.5-5.5L8.794 2.5l-.647-.646a.5.5 0 1 1 .708-.708L10.5 2.793 11.793 1.5l-.647-.646a.5.5 0 0 1 0-.708M11.293 8 8 4.707 3.207 9.5 6.5 12.793 7.793 11.5 6.146 9.854a.5.5 0 1 1 .708-.708L8.5 10.793 9.793 9.5 8.146 7.854a.5.5 0 1 1 .708-.708L10.5 8.793zM8.707 4 12 7.293l.793-.793L9.5 3.207zm-6.5 8.5L3.5 13.793 4.793 12.5 3.5 11.207zm11.586-9L12.5 2.207 11.207 3.5 12.5 4.793z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M15.146.854a.5.5 0 0 1 .708-.708l4 4a.5.5 0 0 1-.708.708l-.646-.647L17.207 5.5l1.647 1.646a.5.5 0 0 1-.708.708l-.646-.647-1.146 1.146-7.5 7.5a.5.5 0 0 1-.708 0l-.646-.646-2.646 2.647a.5.5 0 0 1-.708 0l-.646-.647-2.646 2.647a.5.5 0 0 1-.708-.708L2.793 16.5l-.647-.646a.5.5 0 0 1 0-.708L4.793 12.5l-.647-.646a.5.5 0 0 1 0-.708l7.5-7.5L12.794 2.5l-.647-.646a.5.5 0 0 1 .708-.708L14.5 2.793 15.793 1.5zM12.707 4 16 7.293l.793-.793L13.5 3.207zm2.586 4L12 4.707 5.207 11.5 8.5 14.793 9.793 13.5l-1.647-1.646a.501.501 0 0 1 .708-.708l1.646 1.647 1.293-1.293-1.647-1.646a.5.5 0 1 1 .708-.708l1.646 1.647L13.793 9.5l-1.647-1.646a.5.5 0 0 1 .708-.708L14.5 8.793zM3.207 15.5 4.5 16.793 6.793 14.5 5.5 13.207zM16.5 2.207 15.207 3.5 16.5 4.793 17.793 3.5z"] as readonly string[];

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