/*
 * 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.533 0H.467A.47.47 0 0 0 0 .467v4.066C0 4.79.243 5 .5 5h2.609l1.693 1.865a.468.468 0 0 0 .798-.331V5h.933C6.79 5 7 4.79 7 4.533V.467A.47.47 0 0 0 6.533 0m7.017 13.468c.93.378 1.98.805 2.236 1.39.285.65.208 1.06.194 1.131l-.001.01H5.027s-.131-.426.186-1.148c.256-.585 1.305-1.012 2.236-1.39.219-.09.431-.176.625-.26.904-.4.918-.662.935-.979l.008-.116.003-.072q.004-.036.004-.072a3.1 3.1 0 0 1-.84-1.239l-.006-.006q0-.006-.004-.01l-.003-.011a3 3 0 0 1-.103-.337c-.241-.041-.379-.296-.434-.537-.048-.096-.158-.33-.138-.591.035-.351.18-.51.344-.571v-.055c0-.44.035-1.067.117-1.48a2.56 2.56 0 0 1 .956-1.623C9.348 5.172 9.96 5 10.504 5c.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.29.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.908.955.193.085.406.172.625.26"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M8.4 0H.6C.27 0 0 .27 0 .6v5.25c0 .33.313.579.643.579h3.354l2.177 2.397A.602.602 0 0 0 7.2 8.4V6.429h1.2c.33 0 .6-.27.6-.6V.6c0-.33-.27-.6-.6-.6m8.482 16.777c1.185.482 2.52 1.025 2.846 1.77.363.827.264 1.35.247 1.44l-.002.013H6.034s-.166-.543.236-1.462c.326-.744 1.662-1.288 2.846-1.77.28-.113.55-.223.797-.332 1.15-.508 1.168-.841 1.19-1.244q.003-.072.01-.148 0-.045.004-.092.004-.045.004-.091a3.9 3.9 0 0 1-1.068-1.577l-.009-.008-.004-.013q-.004-.008-.005-.014a4 4 0 0 1-.13-.429c-.307-.052-.482-.376-.553-.683-.06-.122-.2-.42-.175-.752.044-.447.228-.648.438-.727v-.07c0-.56.044-1.357.149-1.883.018-.148.053-.289.096-.437a3.25 3.25 0 0 1 1.121-1.629c.552-.42 1.33-.639 2.023-.639.691 0 1.47.228 2.031.64a3.2 3.2 0 0 1 1.217 2.065c.096.526.149 1.331.149 1.883v.079c.192.078.368.28.411.718.027.341-.105.639-.175.761-.061.298-.236.622-.534.683a3.4 3.4 0 0 1-.149.464c-.236.622-.595 1.165-1.042 1.559 0 .07 0 .14.01.201q.007.09.009.176c.013.39.025.72 1.155 1.216.247.109.517.219.796.332M19.973 20"] as readonly string[];

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