/*
 * 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 = ["M15.76 1.35a1 1 0 0 1-.11 1.41l-7 6a1 1 0 1 1-1.3-1.52l7-6a1 1 0 0 1 1.41.11M8 14a6 6 0 0 0 5.598-8.164l1.586-1.36A8 8 0 1 1 12.58 1.44L10.994 2.8A6 6 0 1 0 8 14m1.33-9.774a4 4 0 1 0 2.603 3.037l-2.624 2.25q-.09.077-.19.144a2 2 0 0 1-1.924.174 2 2 0 0 1-.803-.642 1.99 1.99 0 0 1-.212-2.02c.123-.27.305-.508.53-.697z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M19.707.293a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-1.414-1.414l9-9a1 1 0 0 1 1.414 0m-5.081.839A9.96 9.96 0 0 0 10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10a9.96 9.96 0 0 0-1.132-4.626l-1.501 1.502a8 8 0 1 1-4.243-4.243zm-3.072 3.071a6 6 0 1 0 4.243 4.243l-1.805 1.804A4 4 0 1 1 9.75 6.008z"] as readonly string[];

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