/*
 * 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 = ["M10.127.102c.516-.46 1.696.718 2.626 1.93Q12.873 2 13 2a1 1 0 0 1 .976 1.219c1.236.965 2.421 2.212 1.897 2.68-.515.46-1.694-.72-2.625-1.931a1 1 0 0 1-.521-.007.82.82 0 0 1-.152.608c-2.432 3.26-2.433 3.602 0 6.863a.82.82 0 0 1 .152.606 1 1 0 0 1 .491-.014c.965-1.236 2.213-2.42 2.68-1.897.46.516-.718 1.695-1.93 2.625a1 1 0 0 1-1.187 1.224c-.964 1.236-2.212 2.421-2.68 1.897-.458-.516.72-1.695 1.931-2.625a1 1 0 0 1 .006-.521.82.82 0 0 1-.606-.153c-3.26-2.432-3.602-2.432-6.862 0a.82.82 0 0 1-.609.153 1 1 0 0 1 .015.492c1.237.965 2.421 2.212 1.897 2.68-.515.46-1.694-.72-2.625-1.931Q3.13 13.999 3 14a1 1 0 0 1-.975-1.219C.788 11.816-.397 10.57.127 10.101c.516-.46 1.696.719 2.626 1.93a1 1 0 0 1 .52.007.82.82 0 0 1 .153-.606c2.432-3.261 2.432-3.602 0-6.863a.82.82 0 0 1-.152-.608 1 1 0 0 1-.493.015C1.817 5.212.57 6.397.101 5.873c-.458-.516.72-1.695 1.931-2.625a1 1 0 0 1 1.186-1.224C4.183.788 5.431-.396 5.898.127c.46.516-.718 1.695-1.93 2.625a1 1 0 0 1-.007.521c.21-.03.429.019.609.153 3.26 2.432 3.601 2.432 6.862 0a.82.82 0 0 1 .606-.153 1 1 0 0 1-.013-.492C10.788 1.816 9.603.57 10.127.101"] as readonly string[];

/** Path data for the 20px grid; matches {@link generate-icon-paths.mjs} / `<Icon />` from core. */
const PATHS_20 = ["M14.128.143c.578-.597 1.786.804 2.45 1.95a1 1 0 0 1 1.309 1.365c1.113.668 2.552 1.815 1.985 2.4-.578.596-1.788-.806-2.452-1.953a1 1 0 0 1-.683.059.86.86 0 0 1-.13.626c-3.476 5.227-3.476 5.593 0 10.82.126.19.166.413.13.625a1 1 0 0 1 .722.076c.668-1.113 1.814-2.55 2.399-1.983.595.578-.806 1.786-1.953 2.45A.996.996 0 0 1 17 18a1 1 0 0 1-.459-.113c-.668 1.113-1.814 2.55-2.398 1.985-.597-.578.804-1.788 1.95-2.452a1 1 0 0 1-.058-.684.86.86 0 0 1-.625-.13c-5.227-3.476-5.593-3.475-10.82 0a.86.86 0 0 1-.626.13Q4 16.863 4 17c0 .165-.042.32-.113.458 1.113.668 2.552 1.815 1.985 2.4-.578.596-1.788-.806-2.452-1.953a1 1 0 0 1-1.309-1.365c-1.113-.668-2.55-1.813-1.983-2.397.578-.597 1.786.804 2.45 1.95a1 1 0 0 1 .685-.058.86.86 0 0 1 .13-.625c3.476-5.227 3.476-5.593 0-10.82a.86.86 0 0 1-.13-.627 1 1 0 0 1-.722-.076C1.873 5 .727 6.437.143 5.872c-.597-.578.804-1.788 1.95-2.452a1 1 0 0 1 1.365-1.309C4.126.998 5.273-.439 5.858.128c.595.578-.806 1.786-1.952 2.45a1 1 0 0 1 .057.685.86.86 0 0 1 .627.13c5.227 3.476 5.593 3.476 10.82 0a.86.86 0 0 1 .625-.13 1 1 0 0 1 .077-.723c-1.113-.668-2.55-1.813-1.984-2.397"] as readonly string[];

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