/*
 * 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 = ["M8 7c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.46-1-1-1m4.988.976v-.042a.4.4 0 0 0-.107-.216 7.6 7.6 0 0 0-1.087-1.082c-.83-.703-1.78-1.292-2.824-1.527a4.3 4.3 0 0 0-1.818-.024 5.6 5.6 0 0 0-1.593.595c-.781.427-1.5 1.01-2.125 1.665-.112.12-.225.246-.33.379a.43.43 0 0 0 0 .558c.318.403.699.758 1.086 1.082.831.703 1.78 1.292 2.824 1.527a4.4 4.4 0 0 0 1.831.024c.556-.108 1.087-.325 1.593-.595a8.7 8.7 0 0 0 2.118-1.665c.113-.12.232-.246.338-.379A.4.4 0 0 0 13 8.06V8c-.012-.012-.012-.018-.012-.024M8 10c-1.107 0-2-.893-2-2s.893-2 2-2 2 .893 2 2-.893 2-2 2M7 1a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v5a1 1 0 0 0 2 0V2h4a1 1 0 0 0 1-1m2 0a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V2h-4a1 1 0 0 1-1-1m0 14a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 1 0-2 0v4h-4a1 1 0 0 0-1 1m-2 0a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-5a1 1 0 0 1 2 0v4h4a1 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 = ["M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.46-1-1-1m4.992.975v-.044a.4.4 0 0 0-.106-.225 7.7 7.7 0 0 0-1.087-1.125c-.831-.731-1.78-1.343-2.824-1.587a4.15 4.15 0 0 0-1.819-.025c-.562.112-1.093.337-1.593.619-.78.443-1.5 1.05-2.124 1.73a7 7 0 0 0-.331.395.46.46 0 0 0 0 .58c.318.42.7.788 1.087 1.126.83.731 1.78 1.343 2.824 1.587q.91.214 1.83.025c.557-.112 1.088-.337 1.594-.619.78-.443 1.5-1.05 2.118-1.73.113-.126.231-.257.337-.395a.44.44 0 0 0 .107-.225V10c-.013-.012-.013-.019-.013-.025M10 12c-1.107 0-2-.893-2-2s.893-2 2-2 2 .893 2 2-.893 2-2 2M7 1a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v5a1 1 0 0 0 2 0V2h4a1 1 0 0 0 1-1m6 0a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V2h-4a1 1 0 0 1-1-1m0 18a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-5a1 1 0 1 0-2 0v4h-4a1 1 0 0 0-1 1m-6 0a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-5a1 1 0 1 1 2 0v4h4a1 1 0 0 1 1 1"] as readonly string[];

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