/*
 * 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.29.29c.39-.39 1.03-.39 1.42 0l2.98 2.96c.41.41.41 1.07 0 1.48l-2.98 2.961c-.39.39-1.03.39-1.42 0a.996.996 0 0 1 0-1.41l2.3-2.29-2.3-2.29a.996.996 0 0 1 0-1.411m2.32 7.941c.57.78.51 1.89-.2 2.6l-4.58 4.581c-.78.78-2.05.78-2.83 0l-5.41-5.41c-.38-.38-.59-.89-.59-1.42V4c0-1.1.9-2 2-2h4.28c.08.15.18.29.31.42L8.18 4 6.59 5.58a2.007 2.007 0 0 0 0 2.84c.38.37.87.58 1.41.58s1.04-.21 1.42-.58l.71-.71A2 2 0 0 0 12 9.001c.54 0 1.04-.21 1.42-.58zM3.49 6.991c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5M8.71.29l2.98 2.96c.41.41.41 1.07 0 1.48L8.71 7.692c-.39.39-1.03.39-1.42 0a.996.996 0 0 1 0-1.41l2.3-2.29-2.3-2.29a.996.996 0 0 1 0-1.411c.39-.39 1.03-.39 1.42 0"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M14.293 1.293c.39-.39 1.03-.39 1.42 0l2.98 2.966c.41.41.41 1.072 0 1.482l-2.98 2.966c-.39.39-1.03.39-1.42 0a1 1 0 0 1 0-1.413L16.592 5l-2.3-2.294a1 1 0 0 1 0-1.413m-2.579 0 2.98 2.966c.41.41.41 1.072 0 1.482l-2.98 2.966c-.39.39-1.03.39-1.42 0a1 1 0 0 1 0-1.413L12.593 5l-2.3-2.294a1 1 0 0 1 0-1.413c.39-.39 1.03-.39 1.42 0m4.912 7.917.786.785a2 2 0 0 1 0 2.829l-4.587 4.588a2 2 0 0 1-2.829 0l-7.41-7.41A2 2 0 0 1 2 8.588V4a2 2 0 0 1 2-2h4.588A2 2 0 0 1 9 2.043c.011.497.206.99.585 1.37h.001L11.176 5l-1.59 1.586-.001.002a2 2 0 0 0 0 2.825c.78.782 2.053.782 2.834.002l.001-.002.709-.705a2.007 2.007 0 0 0 3.29.707l.001-.002zM3.994 5.488a1.495 1.495 0 1 0 2.99 0 1.495 1.495 0 0 0-2.99 0"] as readonly string[];

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