import { AppObjectUC, getSingletonComponent, } from "@vived/core";
import { BaseAppState } from "../../BaseApp";
import { ChallengeEntity } from "../Entities";
export class TryChallengeAgainUC extends AppObjectUC {
    static get(appObjects) {
        return getSingletonComponent(TryChallengeAgainUC.type, appObjects);
    }
}
TryChallengeAgainUC.type = "TryChallengeAgainUC";
export function makeTryChallengeAgainUC(appObject) {
    return new TryChallengeAgainUCImp(appObject);
}
class TryChallengeAgainUCImp extends TryChallengeAgainUC {
    get challengeEntity() {
        return this.getCachedSingleton(ChallengeEntity.type);
    }
    get baseApp() {
        return this.getCachedSingleton(BaseAppState.type);
    }
    constructor(appObject) {
        super(appObject, TryChallengeAgainUC.type);
        this.tryChallengeAgain = () => {
            this.challengeEntity?.resetSelectedChallenge();
            if (this.baseApp) {
                this.baseApp.isReviewing = false;
            }
        };
    }
}
//# sourceMappingURL=TryChallengeAgainUC.js.map