/*
 * 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 10a1 1 0 1 1 0 2h-.586c.884.666 2.169 1 3.586 1 .646 0 1.262-.125 1.828-.348l1.505 1.505A7 7 0 0 1 8 15c-1.72 0-3.62-.416-5-1.567V14a1 1 0 1 1-2 0v-3a1 1 0 0 1 1-1zm9-3a1 1 0 0 1 1 1 7 7 0 0 1-.84 3.326l-1.505-1.504A5 5 0 0 0 13 8a1 1 0 0 1 1-1M3.347 6.17A5 5 0 0 0 3 8a1 1 0 0 1-2 0 7 7 0 0 1 .842-3.334zM14 1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-3a1 1 0 1 1 0-2h.586C10.702 3.334 9.417 3 8 3c-.645 0-1.26.123-1.826.345L4.669 1.84A7 7 0 0 1 8 1c1.72 0 3.62.416 5 1.567V2a1 1 0 0 1 1-1M2 1a1.003 1.003 0 0 0-.71 1.71l12 11.99c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L2.71 1.3A.97.97 0 0 0 2 1"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M6 13a1 1 0 1 1 0 2H4.3c1.303 1.32 3.483 2 5.7 2a7 7 0 0 0 3.331-.845l1.46 1.46A9 9 0 0 1 10 19c-2.439 0-5.182-.717-7-2.472V18a1 1 0 1 1-2 0v-4a1 1 0 0 1 1-1zm12-4a1 1 0 0 1 1 1 9 9 0 0 1-1.38 4.785l-1.462-1.46A7 7 0 0 0 17 10a1 1 0 0 1 1-1M3.844 6.668A7 7 0 0 0 3 10a1 1 0 1 1-2 0c0-1.71.488-3.368 1.384-4.792zM18 1a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 1 1 0-2h1.7c-1.303-1.32-3.483-2-5.7-2a7 7 0 0 0-3.33.843L5.21 2.382A9 9 0 0 1 10 1c2.439 0 5.182.717 7 2.472V2a1 1 0 0 1 1-1M2 1c.28 0 .53.11.71.3l16 15.99A1.003 1.003 0 0 1 18 19c-.28 0-.53-.11-.71-.3l-16-15.99A1.003 1.003 0 0 1 2 1"] as readonly string[];

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