/*
 * 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";

export const Stopwatch: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
    const isLarge = (props.size ?? IconSize.STANDARD) >= IconSize.LARGE;
    const pixelGridSize = isLarge ? IconSize.LARGE : IconSize.STANDARD;
    const translation = `${-1 * pixelGridSize / 0.05 / 2}`;
    const style = { transformOrigin: "center" };
    return (
        <SVGIconContainer iconName="stopwatch" ref={ref} {...props}>
            <path
                d={isLarge ? "M200 280A120 120 0 1 1 320 160H200zM180.04 318.76L180 320V360H140A20 20 0 1 0 140 400H260A20 20 0 0 0 260 360H220V320L219.96 318.76A160.02 160.02 0 0 0 200 0A160 160 0 0 0 180.04 318.76" : "M180 280V258.34A120.04 120.04 0 0 0 160 20A120 120 0 0 0 140 258.34V280H120A20 20 0 1 0 120 320H200A20 20 0 0 0 200 280zM160 220A80 80 0 1 1 240 140H160z"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Stopwatch.displayName = `Blueprint6.Icon.Stopwatch`;
export default Stopwatch;
