/*
 * 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.328 10.238c1.015.413 2.16.878 2.439 1.516.303.69.248 2.67.235 3.143L14 15H2s-.113-2.465.232-3.253c.28-.638 1.424-1.104 2.44-1.517.238-.097.47-.191.682-.284.985-.436 1-.722 1.02-1.067l.008-.127q0-.039.004-.079l.004-.078a3.35 3.35 0 0 1-.916-1.351l-.008-.008q0-.005-.003-.01l-.004-.012a3 3 0 0 1-.113-.368c-.262-.045-.412-.323-.472-.585-.053-.105-.173-.36-.15-.646.037-.382.195-.555.375-.623v-.06c0-.48.037-1.163.127-1.613.015-.128.045-.248.083-.375a2.8 2.8 0 0 1 .96-1.396C6.742 1.188 7.41 1 8.003 1s1.261.195 1.741.548a2.76 2.76 0 0 1 1.043 1.77c.083.451.128 1.142.128 1.614V5c.165.068.315.24.353.615a1.2 1.2 0 0 1-.15.653c-.053.255-.203.533-.458.586a3 3 0 0 1-.113.36c-.007.007-.015.037-.015.037-.202.533-.51.998-.893 1.336 0 .06 0 .12.008.173q.006.078.008.15c.011.335.021.618.99 1.043.212.093.444.187.683.285M4.5 7.521a1.6 1.6 0 0 1-.282-.308 2 2 0 0 1-.279-.593c-.304-.652-.29-1.486.153-2.074.023-.628.065-1.278.244-1.884a4 4 0 0 1 .177-.473A2.9 2.9 0 0 0 3.497 2c-.543 0-1.156.179-1.596.502a2.53 2.53 0 0 0-.956 1.624 9.5 9.5 0 0 0-.117 1.479v.062c-.152.062-.29.22-.323.564a1.1 1.1 0 0 0 .137.598c.048.234.186.489.42.537.027.11.062.227.103.33a3.1 3.1 0 0 0 .832 1.259q.002.084-.007.158-.006.072-.007.139c-.01.306-.02.565-.908.955C.281 10.556 0 11.046 0 12v3h1s-.16-2.356 0-3 .572-1.184 1.108-1.59c.61-.46 1.333-.753 2.04-1.039l.213-.087c.857-.35.7-.644.421-1.164a5 5 0 0 1-.282-.6m7 .001a1.6 1.6 0 0 0 .282-.308c.136-.193.224-.401.278-.593.305-.652.292-1.486-.152-2.074-.024-.628-.065-1.278-.244-1.884a4 4 0 0 0-.177-.473A2.9 2.9 0 0 1 12.503 2c.543 0 1.156.179 1.596.502a2.53 2.53 0 0 1 .956 1.624c.076.412.117 1.045.117 1.479v.062c.151.062.289.22.323.564a1.1 1.1 0 0 1-.137.598c-.048.234-.186.489-.42.537-.027.11-.062.227-.103.33a3.1 3.1 0 0 1-.832 1.259q-.002.084.006.158.006.072.008.139c.01.306.02.565.907.955C15.72 10.556 16 11.046 16 12v3h-1s.16-2.356 0-3-.572-1.184-1.108-1.59c-.61-.46-1.333-.753-2.04-1.039l-.213-.087c-.857-.35-.7-.644-.421-1.164a5 5 0 0 0 .283-.599"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M17.691 15.328c-.456-1.056-2.68-1.752-4.154-2.408-1.48-.656-1.272-1.048-1.328-1.592-.008-.072-.008-.152-.016-.232.504-.448.92-1.064 1.192-1.776 0 0 .016-.04.016-.048q.082-.228.152-.48c.337-.072.537-.44.609-.784.08-.136.232-.48.2-.864-.048-.496-.248-.728-.472-.824v-.088c0-.632-.056-1.544-.177-2.144a3.64 3.64 0 0 0-1.393-2.352C11.69 1.256 10.8 1 10.009 1s-1.68.256-2.313.736a3.64 3.64 0 0 0-1.393 2.352c-.112.6-.176 1.512-.176 2.144v.08c-.232.088-.44.32-.488.832-.032.384.12.728.2.864.08.352.28.728.633.784.04.168.096.328.152.48 0 .008.008.024.008.032l.008.016c.272.728.696 1.352 1.216 1.8 0 .072-.008.144-.016.208-.056.544.104.936-1.376 1.592-1.481.656-3.698 1.352-4.154 2.408S2 19 2 19h16s.147-2.616-.309-3.672M1.34 15.15c-.148.302-.34.693-.34 3.85H0v-4c0-1.3.851-2.103 1.905-2.57 1.149-.51 1.168-.837 1.192-1.236l.012-.157q.012-.086.014-.182c-.455-.392-.826-.938-1.064-1.575l-.007-.014q0-.006-.004-.014l-.001-.005-.002-.009a4 4 0 0 1-.133-.42c-.308-.049-.484-.378-.554-.686a1.37 1.37 0 0 1-.175-.756c.042-.448.224-.651.428-.728v-.07c0-.553.056-1.351.154-1.876a3.2 3.2 0 0 1 1.218-2.058C3.536 2.224 4.313 2 5.007 2c.327 0 .673.05 1.005.147a4.5 4.5 0 0 0-.505 1.121 4.4 4.4 0 0 0-.139.612 14 14 0 0 0-.184 1.94c-.286.305-.45.729-.497 1.217v.009c-.045.541.12 1.007.254 1.277.064.227.167.479.33.707.102.141.238.287.41.406l.026.079c.017.056.034.11.064.17a5.5 5.5 0 0 0 1.128 1.818c-.01.151-.03.186-.159.277-.13.092-.343.214-.686.366-.24.106-.538.228-.858.36-.545.223-1.157.474-1.664.721a7.4 7.4 0 0 0-1.222.725c-.358.271-.721.63-.924 1.098zm12.606-3.004h.002c.282.126.59.253.924.39h.003l.27.112c.43.177.888.37 1.32.579a7.5 7.5 0 0 1 1.223.724c.359.271.75.73.953 1.2C18.792 15.5 19 16 19 19h1v-4c0-1.274-.875-2.111-1.905-2.57-1.123-.498-1.136-.822-1.15-1.209a3 3 0 0 0-.012-.184l-.007-.088v-.013l-.007-.102a4 4 0 0 0 1.043-1.554s.014-.035.014-.042c.05-.133.091-.273.133-.42.294-.063.47-.385.532-.686.07-.119.204-.42.176-.756-.043-.434-.218-.637-.414-.721v-.077c0-.553-.049-1.351-.154-1.876a3.2 3.2 0 0 0-1.219-2.058C16.478 2.224 15.7 2 15.008 2c-.327 0-.672.05-1.004.146.219.35.39.727.506 1.122.056.187.106.392.138.606.112.574.17 1.346.186 1.97.273.301.433.713.48 1.19v.012c.045.537-.118 1-.251 1.271a2.2 2.2 0 0 1-.32.696c-.097.14-.228.285-.395.406l-.01.03a5.65 5.65 0 0 1-1.19 2.025v.04l.001.018q.001.077.01.153c.033.039.195.198.788.461"] as readonly string[];

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