/*
 * 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 Geofence: 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="geofence" ref={ref} {...props}>
            <path
                d={isLarge ? "M160 180L161.5 179.94L164.02 179.6L166.24 179L168.46 178.12L170.42 177.08L172.34 175.74L174.14 174.14Q175.22 173.08 176.08 171.9L177.5 169.7L178.58 167.42L179.28 165.32L179.88 162.36L180 160V40A20 20 0 0 0 140.14 37.66L140 40V111.72L34.14 5.86A20 20 0 0 0 4.2 32.26L5.86 34.14L111.68 140H40.08A20 20 0 0 0 37.74 179.86L40.08 180zM220.36 400A20 20 0 0 0 228.1600000000001 398.26L230.56 397L231.18 396.6L233.18 395.04L393.7200000000001 254.52L394.9600000000001 253.24L396.3200000000001 251.52L397.2000000000001 250.16L398.4800000000001 247.6L399.2800000000001 245.26L399.7600000000001 243L399.98 240.84V238.84L399.8400000000001 237.38L399.4600000000001 235.32L398.7200000000001 232.9L397.9400000000001 231.1L396.9400000000001 229.36L297.0200000000001 69.48Q295.2000000000001 66.54 292.5 64.4L290.64 63.06L288.74 61.9999999999999L287 61.26L284.5 60.52A20 20 0 0 0 280.14 60H220V160A60 60 0 0 1 163.52 219.9L160 220H60V280A20 20 0 0 0 66.42 294.68L68.38 296.28L208.38 396.28A20 20 0 0 0 217.38 399.84z" : "M120 140C131 140 140 131 140 120V40C140 29 131 20 120 20S100 29 100 40V71.8L34.2 5.8A20.06 20.06 0 0 0 0 20C0 25.6 2.2 30.6 6 34.2L71.8 100H40C29 100 20 109 20 120S29 140 40 140zM181.76 319.92L183.7 319.6600000000001L185.64 319.18L186.78 318.82L188.78 317.98L189.86 317.4L191.76 316.18L192.8 315.38L312.8 215.38L313.8 214.46L315.32 212.86L316.38 211.46L317.5800000000001 209.56L318.6 207.36A20 20 0 0 0 319.9400000000001 198.44L319.6600000000001 196.34L318.92 193.48L318.2200000000001 191.74L317.36 190.08L237.3600000000001 50.08L236.6800000000001 48.96L235.5000000000001 47.36L234.7400000000001 46.48L232.8200000000001 44.64L230.54 43L228.2200000000001 41.76L226.5000000000001 41.08L224.32 40.48L222.32 40.14L220.94 40.02H176.6Q179.26 47.54 179.86 55.82L180 60V120A60 60 0 0 1 123.52 179.9L120 180H60C52.98 180 46.22 178.8 39.96 176.58L40 220L40.04 221.4L40.3 223.4L40.6 224.86L41.1 226.56L41.96 228.64L43.08 230.6600000000001L43.98 231.98L45.56 233.84L47.24 235.4L48.9 236.64L168.9 316.64L170.3 317.5L172.7 318.62L174.92 319.3400000000001L177.08 319.7800000000001L178.74 319.98H179.3600000000001A20 20 0 0 0 181.76 319.92"}
                fillRule="evenodd"
                transform={`scale(0.05, -0.05) translate(${translation}, ${translation})`}
                style={style}
            />
        </SVGIconContainer>
   );
});
Geofence.displayName = `Blueprint6.Icon.Geofence`;
export default Geofence;
