function trueDecObjIdxs = getTrueDecisionObjectiveIdxsFromReqTable(aTestComp, aGoalIdToObjectiveIdMap)
%

%   Copyright 2022 The MathWorks, Inc.

    trueDecObjIdxs = [];

    allMdlObjs = sldvprivate('sldv_datamodel_get_modelobjects', aTestComp);
    for idx = 1 : length(allMdlObjs)
        mdlObj = allMdlObjs(idx);
        if ~mdlObj.isReqTable
            continue;
        end

        decisions = mdlObj.decisions;
        for jdx = 1:length(decisions)
            decision = decisions(jdx);

            if sf('Feature', 'Coverage ReqTable PositiveOnly')
                trueGoal = decision.goals(1);
            else
                trueGoal = decision.goals(2);
            end

            if ~trueGoal.isEnabled()
                continue;
            end

            assert(strcmpi(trueGoal.label, getString(message('Sldv:goal_label:True'))));

            trueDecObjIdxs = [trueDecObjIdxs ...
                              aGoalIdToObjectiveIdMap(trueGoal.getGoalMapId())]; %#ok<AGROW>
        end
    end
end
