package com.kakao.auth.network;

import com.bytedance.covode.number.Covode;
import com.kakao.auth.Session;
import com.kakao.auth.ageauth.DefaultAgeAuthService;
import com.kakao.auth.helper.CurrentActivityProvider;
import com.kakao.network.response.ApiResponseStatusError;

public interface ApiErrorHandlingService {
    static {
        Covode.recordClassIndex(45833);
    }

    boolean shouldRetryAfterTryingRefreshToken();

    boolean shouldRetryWithApiError(ApiResponseStatusError apiResponseStatusError);

    public static class Factory {
        public static ApiErrorHandlingService instance;

        public static ApiErrorHandlingService getInstance() {
            return instance;
        }

        static {
            Covode.recordClassIndex(45834);
            DefaultApiErrorHandlingService defaultApiErrorHandlingService = new DefaultApiErrorHandlingService();
            defaultApiErrorHandlingService.setSession(Session.getCurrentSession());
            defaultApiErrorHandlingService.setAgeAuthService(DefaultAgeAuthService.getInstance());
            defaultApiErrorHandlingService.setActivityProvider(CurrentActivityProvider.Factory.getInstance());
            instance = defaultApiErrorHandlingService;
        }
    }
}
