/*
 * 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 = ["M6.693 5a2.4 2.4 0 0 0 .767 1H6.12C6.05 6.61 6 7.27 6 8s.05 1.39.12 2h3.76a18 18 0 0 0 .111-1.472 2.4 2.4 0 0 0 .964.76q-.026.365-.065.712h2.76c.159-.454.27-.93.32-1.422A2.53 2.53 0 0 0 14.5 7v-.5h.5c.28 0 .563-.042.834-.131q.165.79.166 1.631c0 4.42-3.58 8-8 8s-8-3.58-8-8A7.998 7.998 0 0 1 9.631.166 2.7 2.7 0 0 0 9.5 1v.5H9C7.476 1.5 6.5 2.77 6.5 4v.048q-.13.435-.23.952zM5.27 5c.2-1.11.51-2.03.91-2.69A6.03 6.03 0 0 0 2.83 5zM2.35 6C2.13 6.63 2 7.3 2 8s.13 1.37.35 2h2.76C5.04 9.38 5 8.72 5 8s.04-1.38.11-2zm2.92 5H2.83a6.03 6.03 0 0 0 3.35 2.69c-.4-.66-.7-1.58-.91-2.69m1 0c.37 1.9 1.06 3 1.73 3s1.36-1.1 1.73-3zm4.46 0c-.21 1.11-.51 2.03-.91 2.69A6.03 6.03 0 0 0 13.17 11zM9 5c-.6 0-1-.4-1-1 0-.5.4-1 1-1h2V1c0-.6.4-1 1-1s1 .4 1 1v2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1s-1-.4-1-1V5z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["m12.75 7-.002-.01Q12.874 7 13 7c0 .755.26 1.539.86 2.14q.062.06.125.116.058 1.376-.095 2.744h3.83c.17-.64.28-1.31.28-2q0-.37-.04-.732A2.92 2.92 0 0 0 19 7q.264 0 .526-.049C19.834 7.912 20 8.937 20 10c0 5.52-4.48 10-10 10S0 15.52 0 10 4.48 0 10 0c1.06 0 2.084.165 3.043.472A3.3 3.3 0 0 0 13 1c-1.049 0-1.88.5-2.398 1.204A1.1 1.1 0 0 0 10 2C8.93 2 7.75 4.05 7.25 7zm.14 5c.07-.64.11-1.31.11-2s-.04-1.36-.12-2H7.11a18.4 18.4 0 0 0 0 4zM6.24 7c.31-1.99.92-3.66 1.72-4.73A8 8 0 0 0 2.61 7zM2 10c0 .69.11 1.36.28 2h3.83a18.4 18.4 0 0 1 0-4H2.28C2.11 8.64 2 9.31 2 10m4.24 3H2.61c.94 2.31 2.9 4.08 5.35 4.73-.8-1.07-1.41-2.74-1.72-4.73M10 18c1.07 0 2.25-2.05 2.75-5h-5.5c.5 2.95 1.68 5 2.75 5m3.76-5c-.32 1.99-.93 3.66-1.72 4.73A8 8 0 0 0 17.39 13zM13 5c-.6 0-1-.4-1-1 0-.5.4-1 1-1h2V1c0-.6.4-1 1-1 .5 0 1 .4 1 1v2h2c.5 0 1 .4 1 1s-.5 1-1 1h-2v2c0 .6-.5 1-1 1-.6 0-1-.4-1-1V5z"] as readonly string[];

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