import React from "react";
import Lottie from "react-lottie";
import "../Successfull_Lottie/Successfull_Lottie.css";
import animationData from "./Loading.json";
import "./Loading.css";
function Loading(props) {
  const defaultOptions = {
    loop: true,
    autoplay: true,
    animationData: animationData,
    rendererSettings: {
      preserveAspectRatio: "xMidYMid slice",
    },
  };

  return (
    <section className="main loading-main">
      <div className="success_div">
        <div className="Successfull_Lottie_icon">
          <Lottie className="me-auto" options={defaultOptions} />
        </div>
        <p className="success_text">{props?.successText}</p>
      </div>
    </section>
  );
}
export default Loading;
