/*
 * 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 = ["M3 1a1 1 0 0 1 .894.553c.102.202.393.607.779.957.419.381.72.49.827.49.108 0 .408-.109.827-.49.386-.35.677-.755.779-.957a1 1 0 0 1 1.788 0c.102.202.393.607.779.957.419.381.72.49.827.49.108 0 .408-.109.827-.49.386-.35.677-.755.779-.957a1 1 0 0 1 1.788 0c.173.344.38.75.637 1.072.277.347.437.375.469.375a1 1 0 1 1 0 2c-.968 0-1.642-.64-2.03-1.125l-.076-.097a6 6 0 0 1-.221.212C12.175 4.442 11.393 5 10.5 5c-.892 0-1.675-.558-2.173-1.01A6 6 0 0 1 8 3.67q-.158.165-.327.32C7.175 4.442 6.393 5 5.5 5c-.892 0-1.675-.558-2.173-1.01a6 6 0 0 1-.221-.212l-.075.097C2.64 4.36 1.968 5 1 5a1 1 0 0 1 0-2c.032 0 .191-.028.47-.375.256-.321.463-.728.636-1.072A1 1 0 0 1 3 1m0 5a1 1 0 0 1 .894.553c.102.202.393.607.779.957.419.381.72.49.827.49.108 0 .408-.109.827-.49.386-.35.677-.755.779-.957a1 1 0 0 1 1.788 0c.102.202.393.607.779.957.419.381.72.49.827.49.108 0 .408-.109.827-.49.386-.35.677-.755.779-.957a1 1 0 0 1 1.788 0c.173.344.38.75.637 1.072.277.347.437.375.469.375a1 1 0 1 1 0 2c-.968 0-1.642-.639-2.03-1.125l-.076-.097a6 6 0 0 1-.221.212c-.498.452-1.28 1.01-2.173 1.01-.892 0-1.675-.558-2.173-1.01A6 6 0 0 1 8 8.67q-.158.165-.327.32C7.175 9.442 6.393 10 5.5 10c-.892 0-1.675-.558-2.173-1.01a6 6 0 0 1-.221-.212l-.075.097C2.64 9.36 1.968 10 1 10a1 1 0 0 1 0-2c.032 0 .191-.028.47-.375.256-.321.463-.728.636-1.072A1 1 0 0 1 3 6m.894 5.553a1 1 0 0 0-1.788 0c-.173.344-.38.75-.637 1.072-.278.347-.437.375-.469.375a1 1 0 1 0 0 2c.968 0 1.642-.639 2.03-1.125l.076-.097q.108.109.221.212C3.825 14.442 4.607 15 5.5 15c.892 0 1.675-.558 2.173-1.01q.17-.155.327-.32.158.165.327.32c.498.452 1.28 1.01 2.173 1.01.892 0 1.675-.558 2.173-1.01q.113-.104.221-.212l.075.097C13.36 14.36 14.032 15 15 15a1 1 0 1 0 0-2c-.032 0-.191-.028-.47-.375-.256-.321-.463-.728-.636-1.072a1 1 0 0 0-1.788 0c-.102.202-.393.607-.779.957-.419.381-.72.49-.827.49-.108 0-.408-.109-.827-.49-.386-.35-.677-.755-.779-.957a1 1 0 0 0-1.788 0c-.102.202-.393.607-.779.957-.419.381-.72.49-.827.49-.108 0-.408-.109-.827-.49-.386-.35-.677-.755-.779-.957"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M4.948 2.682a1 1 0 0 0-1.897.001l-.005.016-.027.074a6 6 0 0 1-.6 1.172C1.958 4.635 1.468 5 .999 5a1 1 0 0 0 0 2c1.457 0 2.442-1.027 3-1.825C4.558 5.973 5.543 7 7 7s2.442-1.027 3-1.825C10.558 5.973 11.543 7 13 7s2.442-1.027 3-1.825C16.558 5.973 17.544 7 19 7a1 1 0 1 0 0-2c-.47 0-.958-.365-1.418-1.055a6 6 0 0 1-.628-1.246l-.006-.016a1 1 0 0 0-1.896 0l-.006.016-.027.074a6 6 0 0 1-.6 1.172C13.959 4.635 13.469 5 13 5s-.958-.365-1.418-1.055a6 6 0 0 1-.628-1.246l-.006-.016a1 1 0 0 0-1.897 0l-.005.016-.027.074a6 6 0 0 1-.6 1.172C7.958 4.635 7.468 5 6.999 5s-.958-.365-1.418-1.055A6 6 0 0 1 4.954 2.7zm0 6a1 1 0 0 0-1.897.001l-.005.016-.027.074a6 6 0 0 1-.6 1.172C1.959 10.635 1.469 11 1 11a1 1 0 1 0 0 2c1.457 0 2.442-1.027 3-1.825C4.558 11.973 5.543 13 7 13s2.442-1.027 3-1.825c.558.798 1.543 1.825 3 1.825s2.442-1.027 3-1.825c.558.798 1.544 1.825 3 1.825a1 1 0 1 0 0-2c-.47 0-.958-.365-1.418-1.055a6 6 0 0 1-.628-1.246l-.006-.016a1 1 0 0 0-1.896 0l-.006.016-.027.074a6 6 0 0 1-.6 1.172c-.46.69-.95 1.055-1.419 1.055s-.958-.365-1.418-1.055a6 6 0 0 1-.628-1.246l-.006-.016a1 1 0 0 0-1.897 0l-.005.016-.027.074a6 6 0 0 1-.6 1.172C7.959 10.635 7.469 11 7 11s-.958-.365-1.418-1.055A6 6 0 0 1 4.954 8.7zm0 6 .006.017.027.074a6 6 0 0 0 .6 1.172C6.041 16.635 6.531 17 7 17s.958-.365 1.418-1.055a6 6 0 0 0 .628-1.246l.005-.016a1 1 0 0 1 1.897 0l.006.016.027.074a6 6 0 0 0 .6 1.172c.46.69.95 1.055 1.419 1.055s.958-.365 1.418-1.055a6 6 0 0 0 .628-1.246l.006-.016a1 1 0 0 1 1.896 0l.006.016.027.074a6 6 0 0 0 .6 1.172c.46.69.95 1.055 1.419 1.055a1 1 0 1 1 0 2c-1.456 0-2.442-1.027-3-1.825-.558.798-1.543 1.825-3 1.825s-2.442-1.027-3-1.825C9.442 17.973 8.457 19 7 19s-2.442-1.027-3-1.825C3.442 17.973 2.457 19 1 19a1 1 0 1 1 0-2c.47 0 .958-.365 1.418-1.055a6 6 0 0 0 .628-1.246l.005-.016a1 1 0 0 1 1.897-.001"] as readonly string[];

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