#ifndef IMAPAUTHENTICATOR_H
#define IMAPAUTHENTICATOR_H

#include "authenticator.h"

class ImapAuthenticator : public Authenticator
{
    Q_OBJECT
public:
    explicit ImapAuthenticator(QObject *parent = nullptr);
    ~ImapAuthenticator() override = default;

    void authenticate(const QString &email) override;
    void refreshToken(const Account &account) override;
    QString providerName() const override { return "imap"; }

    void configure(const QString &imapServer, int imapPort,
                   const QString &smtpServer, int smtpPort,
                   const QString &username, const QString &password);

private:
    QString m_imapServer;
    int m_imapPort = 993;
    QString m_smtpServer;
    int m_smtpPort = 587;
    QString m_username;
    QString m_password;
};

#endif // IMAPAUTHENTICATOR_H
