function freblkUpdateAutogenPRBSParamsLabels(blk,varargin)
%   Utility function of FRE block to update the appearance of
%   AutogenPRBSParams Labels

%   Copyright 2023 The MathWorks, Inc.
if any(strcmpi(get_param(bdroot(blk),'SimulationStatus'),{'external','running','paused'}))
    return
end

maskObj = Simulink.Mask.get(blk);
objectUseAutogenNumOfPRBSPeriod = maskObj.Parameters.findobj('Name','UseAutogenNumOfPRBSPeriod');
objectUseAutogenPRBSSignalOrder = maskObj.Parameters.findobj('Name','UseAutogenPRBSSignalOrder');

if strcmpi(get_param(blk,'ExperimentMode'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementPRBS'))
    if nargin == 3
        AutogenNumOfPRBSPeriod = varargin{1};
        AutogenPRBSSignalOrder = varargin{2};
        objectUseAutogenNumOfPRBSPeriod.Prompt = getString(message('Slcontrol:onlinefre:promptAutogenNumOfPRBSPeriod',num2str(AutogenNumOfPRBSPeriod)));
        objectUseAutogenPRBSSignalOrder.Prompt = getString(message('Slcontrol:onlinefre:promptAutogenPRBSSignalOrder',num2str(AutogenPRBSSignalOrder)));
    else
        objectUseAutogenNumOfPRBSPeriod.Prompt = getString(message('Slcontrol:onlinefre:promptUseAutogenPRBSParams'));
        objectUseAutogenPRBSSignalOrder.Prompt = getString(message('Slcontrol:onlinefre:promptUseAutogenPRBSParams'));
    end
end