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