import React from "react";
import { IntegrationLogoSvgWrapper, SvgLogoProps } from "./wrapper";

export const OneLoginSvg = ({
  color = "#1c1f2a",
  square,
  ...rest
}: SvgLogoProps) => {
  const viewBox = square ? "0 0 32 32" : "0 0 130 32";
  const path = square ? (
    <>
      <path
        fill={color}
        d="M15.9 0.114c-8.771 0-15.9 7.114-15.9 15.886 0 8.786 7.114 15.9 15.9 15.9s15.9-7.114 15.9-15.9c0-8.771-7.114-15.886-15.9-15.886z"
      />
      <path
        fill="#fff"
        d="M18.271 21.629c0 0.3-0.157 0.457-0.457 0.457h-2.857c-0.3 0-0.457-0.157-0.457-0.457v-6.886h-2.186c-0.3 0-0.457-0.157-0.457-0.457v-2.857c0-0.3 0.157-0.457 0.457-0.457h5.571c0.3 0 0.371 0.157 0.371 0.371v10.286h0.014z"
      />
    </>
  ) : (
    <path
      fill={color}
      d="M42.886 14.44c0.293-1.841 1.914-4.126 5.010-4.126 2.871 0 4.529 2.103 4.791 4.126h-9.801zM38.906 15.915c0 5.083 3.682 8.546 9.064 8.546 3.535 0 5.858-1.731 7.223-3.243 0.14-0.152 0.219-0.366 0-0.591l-1.896-1.749c-0.219-0.219-0.433-0.14-0.591 0-0.963 0.847-2.45 2.194-4.736 2.194-2.651 0-4.571-1.621-5.010-3.682h13.117c0.366 0 0.591-0.219 0.591-0.591v-0.811c0-4.864-3.17-8.917-8.546-8.917-5.79 0-9.216 3.95-9.216 8.844zM59.020 23.723c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-23.357c0-0.219-0.073-0.366-0.366-0.366h-2.95c-0.293 0-0.366 0.146-0.366 0.366v23.357h-0.006zM33.085 23.723c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-9.356c0-3.98-2.359-7.296-7.369-7.296h-0.073c-2.432 0-4.273 0.811-5.376 1.768v-0.884c0-0.293-0.219-0.445-0.445-0.445h-2.798c-0.293 0-0.445 0.146-0.445 0.445v15.768c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-8.692c0-2.725 1.402-4.718 4.645-4.718s4.492 1.987 4.492 4.718v8.692h-0.006zM86.156 28.648c1.286 1.506 3.992 3.328 7.796 3.328 5.315 0 8.546-3.243 8.546-8.399v-15.622c0-0.293-0.146-0.445-0.445-0.445h-2.651c-0.293 0-0.445 0.146-0.445 0.445v0.884c-1.176-0.957-2.725-1.768-5.23-1.768-4.791 0-8.99 3.535-8.99 8.692 0 5.23 4.053 8.692 8.99 8.692 2.316 0 3.938-0.847 5.083-1.743v1.085c0 2.95-1.713 4.864-4.894 4.864-2.639 0-4.389-1.432-5.498-2.505-0.226-0.219-0.518-0.219-0.738 0l-1.53 1.755c-0.219 0.219-0.219 0.439 0.006 0.738zM14.147 15.762c0 2.95-2.213 5.303-5.157 5.303s-5.010-2.505-5.010-5.303v-0.146c0-2.798 2.060-5.157 5.010-5.157s5.157 2.359 5.157 5.303zM0 15.762c0 4.718 3.834 8.692 8.99 8.692s8.99-3.974 8.99-8.692v-0.146c0-4.718-3.834-8.546-8.99-8.546s-8.99 3.834-8.99 8.692zM79.067 15.762c0 2.95-2.213 5.303-5.157 5.303-2.95 0-5.010-2.505-5.010-5.303v-0.146c0-2.798 2.060-5.157 5.010-5.157 2.944 0 5.157 2.359 5.157 5.303zM64.914 15.762c0 4.718 3.834 8.692 8.99 8.692s8.99-3.98 8.99-8.692v-0.146c0-4.718-3.834-8.546-8.99-8.546s-8.99 3.834-8.99 8.692zM105.96 23.723c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-15.842c0-0.219-0.073-0.366-0.366-0.366h-2.95c-0.293 0-0.366 0.146-0.366 0.366v15.842h-0.006zM105.96 3.31c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-2.944c0-0.219-0.073-0.366-0.366-0.366h-2.95c-0.293 0-0.366 0.146-0.366 0.366v2.944h-0.006zM125.854 23.723c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-9.356c0-3.98-2.359-7.296-7.369-7.296h-0.073c-2.432 0-4.273 0.811-5.376 1.768v-0.884c0-0.293-0.219-0.445-0.445-0.445h-2.798c-0.293 0-0.445 0.146-0.445 0.445v15.768c0 0.293 0.146 0.445 0.445 0.445h2.798c0.293 0 0.445-0.146 0.445-0.445v-8.692c0-2.725 1.402-4.718 4.645-4.718s4.492 1.987 4.492 4.718v8.692h-0.006zM98.883 15.762c0 2.95-2.213 5.303-5.157 5.303-2.95 0-5.010-2.505-5.010-5.303v-0.146c0-2.798 2.060-5.157 5.010-5.157s5.157 2.359 5.157 5.303z"
    />
  );

  return (
    <IntegrationLogoSvgWrapper viewBox={viewBox} {...rest}>
      <title>OneLogin integration logo</title>
      {path}
    </IntegrationLogoSvgWrapper>
  );
};
