/*
 * 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 3c-.55 0-1.07.09-1.57.26a6.46 6.46 0 0 1 0 9.48c.5.17 1.02.26 1.57.26 2.76 0 5-2.24 5-5s-2.24-5-5-5M9.78 9.38l.09-.27c.08-.36.13-.73.13-1.11s-.05-.75-.13-1.11l-.09-.27a5.3 5.3 0 0 0-.29-.79l-.12-.21c-.14-.27-.31-.52-.51-.76a1 1 0 0 0-.08-.1c-.24-.27-.49-.52-.78-.74-.43-.32-.92-.58-1.45-.75l.01-.01c-.1-.03-.2-.05-.3-.08-.12-.03-.23-.07-.36-.09A5.3 5.3 0 0 0 5 3C2.24 3 0 5.24 0 8s2.24 5 5 5c.31 0 .61-.04.9-.09.12-.02.24-.06.36-.09.1-.03.21-.04.3-.08l-.01-.01c.88-.29 1.64-.8 2.22-1.49.03-.03.06-.07.09-.1.19-.24.36-.49.51-.76.04-.07.08-.14.11-.21.13-.25.23-.52.3-.79"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M11.47 12.46c.16-.36.29-.74.38-1.14 0-.02.01-.04.01-.06.09-.4.14-.82.14-1.26s-.05-.86-.14-1.27c0-.02-.01-.04-.01-.06-.09-.4-.22-.78-.38-1.14-.01-.02-.02-.03-.02-.05a6 6 0 0 0-.61-1.03c0-.01-.01-.01-.01-.02a6.3 6.3 0 0 0-2.1-1.77c-.19-.1-.39-.18-.59-.26-.03-.01-.06-.02-.1-.03-.17-.07-.34-.12-.52-.17-.05-.01-.1-.03-.15-.04a4 4 0 0 0-.52-.09c-.05-.01-.11-.02-.17-.03C6.46 4.02 6.23 4 6 4c-3.31 0-6 2.69-6 6s2.69 6 6 6c.23 0 .46-.02.68-.04l.17-.03c.17-.02.34-.06.51-.09.05-.01.1-.03.15-.04.18-.05.36-.1.53-.17l.09-.03a5.97 5.97 0 0 0 2.68-2.04c0-.01.01-.01.01-.02.24-.32.44-.66.61-1.03.02-.01.03-.03.04-.05M14 4c-.99 0-1.91.24-2.73.66a7.51 7.51 0 0 1 0 10.68c.82.42 1.74.66 2.73.66 3.31 0 6-2.69 6-6s-2.69-6-6-6"] as readonly string[];

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