package org.jabref.gui.push;

import org.jabref.gui.DialogService;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.icon.JabRefIcon;
import org.jabref.gui.util.UiTaskExecutor;
import org.jabref.logic.push.PushToApplicationPreferences;
import org.jabref.logic.push.PushToTexShop;

public class GuiPushToTexShop extends PushToTexShop implements GuiPushToApplication {

    private final DialogService dialogService;

    public GuiPushToTexShop(DialogService dialogService, PushToApplicationPreferences preferences) {
        super(dialogService, preferences);
        this.dialogService = dialogService;
    }

    @Override
    public JabRefIcon getApplicationIcon() {
        return IconTheme.JabRefIcons.APPLICATION_TEXSHOP;
    }

    @Override
    public void sendErrorNotification(String title, String message) {
        UiTaskExecutor.runNowOrInJavaFXThread(() -> dialogService.showErrorDialogAndWait(title, message));
    }
}
