import React, { LegacyRef, useEffect, useRef } from 'react';
import { IonToast } from '@ionic/react';
import './style.css';
import { THE_WORD_REMOVED_DISMISS_TIMEOUT, THE_WORD_REMOVED } from '../../constants';

const RemoveFavoritePrompt: React.FC<{ open: boolean; setIsOpen: (isOpen: boolean) => void }> = ({
  open,
  setIsOpen
}) => {
  return (
    <>
      <IonToast
        className='remove-favorite-prompt-toast'
        isOpen={open}
        message={THE_WORD_REMOVED}
        onDidDismiss={() => setIsOpen(false)}
        color='success'
        duration={THE_WORD_REMOVED_DISMISS_TIMEOUT}
      />
    </>
  );
};

export default RemoveFavoritePrompt;
