import { QuestionEntity } from "../Entities/QuestionEntity";
import { SetAnswerFeedbackUC } from "../UC/SetAnswerFeedbackUC";
export function setAnswerFeedback(answerID, feedback, appObjects) {
    const questionEntity = QuestionEntity.get(appObjects);
    if (!questionEntity) {
        appObjects.submitWarning("setAnswerFeedback", "Can't find QuestionEntity");
        return;
    }
    const answer = questionEntity.getAnswer(answerID);
    if (!answer) {
        appObjects.submitWarning("setAnswerFeedback", "Can't find Answer by ID");
        return;
    }
    const uc = answer.appObject.getComponent(SetAnswerFeedbackUC.type);
    if (!uc) {
        appObjects.submitWarning("setAnswerFeedback", "Can't find SetAnswerFeedbackUC on Answer");
        return;
    }
    uc.setFeedback(feedback);
}
//# sourceMappingURL=setAnswerFeedback.js.map