/*
 * 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 = ["M5.175 7.004a3 3 0 0 1 2.83-2.001c1.305 0 2.416.835 2.83 2.001h1.985q-1.344-1.134-1.515-1.31a1.03 1.03 0 0 1-.292-.705c0-.538.453-.989.99-.989a.95.95 0 0 1 .696.294q.176.186 3.008 3.016c.176.176.293.41.293.684a.98.98 0 0 1-.283.695l-3.013 3.027a.995.995 0 0 1-1.691-.702c0-.273.116-.544.292-.72l1.515-1.292h-1.98a3 3 0 0 1-2.835 2.016A3 3 0 0 1 5.17 9.002H3.18l1.515 1.292c.176.176.292.447.292.72a.995.995 0 0 1-1.69.702L.282 8.69A.98.98 0 0 1 0 7.994a.96.96 0 0 1 .293-.684A536 536 0 0 0 3.3 4.294.95.95 0 0 1 3.997 4a1 1 0 0 1 .99.989c0 .273-.12.528-.292.705q-.172.176-1.515 1.31z"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M6.13 9.004A4.005 4.005 0 0 1 10.012 6c1.87 0 3.44 1.278 3.881 3.005h2.768l-2.354-2.317a.97.97 0 0 1-.283-.691c0-.536.462-.995 1-.995.273 0 .517.107.693.283l4 4.041a.97.97 0 0 1 .284.692.96.96 0 0 1-.293.682l-3.991 3.997a.94.94 0 0 1-.694.292c-.537 0-1-.46-1-.997a.97.97 0 0 1 .284-.692l2.345-2.29h-2.765a4.005 4.005 0 0 1-3.875 2.981 4.005 4.005 0 0 1-3.874-2.981H3.349l2.376 2.308a.97.97 0 0 1 .283.691 1 1 0 0 1-.994.983 1 1 0 0 1-.713-.291L.293 10.699A.96.96 0 0 1 0 10.017a.97.97 0 0 1 .283-.692l4.03-4.037a1 1 0 0 1 .701-.283c.537 0 .994.464.994 1a.97.97 0 0 1-.283.691L3.34 9.004z"] as readonly string[];

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