/*
 * 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.04M13 7c0 .6-.4 1-1 1s-1-.4-1-1c0-1.1-.9-2-2-2-.6 0-1-.4-1-1s.4-1 1-1c2.2 0 4 1.8 4 4m3 0c0 .6-.4 1-1 1s-1-.4-1-1c0-2.8-2.2-5-5-5-.6 0-1-.4-1-1s.4-1 1-1c3.9 0 7 3.1 7 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 2c-.6 0-1-.4-1-1s.4-1 1-1c5 0 9 4 9 9 0 .6-.4 1-1 1s-1-.4-1-1c0-3.9-3.1-7-7-7m0 4c-.6 0-1-.4-1-1s.4-1 1-1c2.8 0 5 2.2 5 5 0 .6-.4 1-1 1s-1-.4-1-1c0-1.7-1.3-3-3-3"] as readonly string[];

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