import Lottie from 'lottie-react';
import animationData from '../../../successSvg.json';
import Modal from '../../Shared/Modal/Index';
import Button from '../../Base/Button/Index';
import styles from './styles.module.css';
const SuccessModal = ({ onConfirm }) => {
  return (
    <Modal>
      <div className={styles['content-wrapper']}>
        <div className={styles['btn-wrapper']}>
          <p>Booked Successfully</p>
        </div>
        <Lottie
          className={styles.lottieSvg}
          animationData={animationData}
          loop={false}
          autoplay={true}
        />
        <div className={styles['btn-wrapper']}>
          <Button size={'md'} onClick={onConfirm}>
            Go Back
          </Button>
        </div>
      </div>
    </Modal>
  );
};

export default SuccessModal;
