/*
 * 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 = ["M15.916 12.41c-.06-.06-3.373-2-3.483-2.05a.8.8 0 0 0-.32-.08c-.15 0-.34.11-.57.32-.23.22-.941 1.19-1.152 1.4-.21.22-.38.32-.52.32a.7.7 0 0 1-.25-.06c-.1-.04-1.161-.58-3.363-2.52-2.202-1.929-2.492-3.199-2.502-3.549 0-.14.11-.31.32-.52.22-.21.45-.41.7-.6s.491-.4.701-.62c.22-.23.32-.42.32-.57a.8.8 0 0 0-.08-.319c-.05-.1-2.051-3.41-2.121-3.48-.15-.15-.741-.08-1.041.08-2.392 1.3-2.582 3.04-2.552 3.73.04.71.49 4.459 4.163 7.948C8.73 16.17 11.903 16 12.113 16c.69 0 2.822-.38 3.723-2.55.13-.32.25-.87.08-1.04M15.71 4.3l-2-2A.97.97 0 0 0 13 2a1.003 1.003 0 0 0-.71 1.71l.29.29H9c-.55 0-1 .45-1 1s.45 1 1 1h3.59l-.29.29a1.003 1.003 0 0 0 1.42 1.42l2-2c.18-.18.29-.43.29-.71s-.12-.52-.3-.7"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M19.845 15.51c-.08-.08-4.206-2.5-4.346-2.57a.9.9 0 0 0-.4-.1c-.189 0-.419.13-.709.4-.28.27-1.168 1.49-1.428 1.76s-.48.4-.65.4c-.08 0-.19-.02-.319-.07-.13-.05-1.449-.73-4.196-3.15s-3.107-4-3.127-4.44c0-.17.13-.39.4-.65.28-.25.57-.51.89-.74q.476-.36.878-.78c.27-.28.4-.52.4-.71 0-.13-.03-.27-.1-.4C7.068 4.32 4.57.19 4.48.1c-.19-.18-.92-.1-1.289.1C.205 1.82-.045 4 .005 4.86c.05.89.61 5.58 5.195 9.93 5.694 5.41 9.65 5.2 9.91 5.2.869 0 3.516-.48 4.645-3.19.16-.38.31-1.07.09-1.29M11 7h5.58l-1.29 1.29a1 1 0 0 0-.3.71 1.003 1.003 0 0 0 1.71.71l3-3c.18-.18.29-.43.29-.71s-.11-.53-.29-.71l-3-3a1.003 1.003 0 0 0-1.42 1.42L16.58 5H11c-.55 0-1 .45-1 1s.45 1 1 1"] as readonly string[];

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