/*
 * 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 Camera: 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="camera" ref={ref} {...props}>
            <path
                d={isLarge ? "M200 240C166.8 240 140 213.2 140 180S166.8 120 200 120S260 146.8 260 180S233.2 240 200 240M380 320H308.2L274 354.2A19.2 19.2 0 0 1 260 360H140C134.4 360 129.4 357.8 125.8 354.2L91.8 320H20C9 320 0 311 0 300V100C0 89 9 80 20 80H102.2C127.4 55.2 162 40 200 40S272.6 55.2 297.8 80H380C391 80 400 89 400 100V300C400 311 391 320 380 320M80 240H40V280H80zM200 80C144.8 80 100 124.8 100 180S144.8 280 200 280S300 235.2 300 180S255.2 80 200 80" : "M300 260H248.2L214 294.2A19.2 19.2 0 0 1 200 300H120C114.4 300 109.4 297.8 105.8 294.2L71.8 260H20C9 260 0 251 0 240V100C0 89 9 80 20 80H71.2C93.2 55.6 124.6 40 160 40S226.8 55.6 248.8 80H300C311 80 320 89 320 100V240C320 251 311 260 300 260M60 200H20V220H60zM160 80C115.8 80 80 115.8 80 160S115.8 240 160 240S240 204.2 240 160S204.2 80 160 80M160 200C138 200 120 182 120 160S138 120 160 120S200 138 200 160S182 200 160 200"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Camera.displayName = `Blueprint6.Icon.Camera`;
export default Camera;
