function freblkUpdateAutogenPRBSParamsCheckboxes(blk)
%   Utility function of FRE block to update the appearance of
%   AutogenPRBSParams checkboxes

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

maskObj = Simulink.Mask.get(blk);
IsExternalSource = strcmpi(get_param(blk,'SineSource'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementPort'));
IsOnlineEstimation = strcmpi(get_param(blk,'EstimationMode'),slsvInternal('slsvGetEnStringFromCatalog','Slcontrol:onlinefre:rbtnElementOnline'));
wksp = getWorkspaceVariables(maskObj);
Ts = wksp(strcmp('DiscreteTs',{wksp.Name})).Value;
if (IsExternalSource && IsOnlineEstimation) || (~isempty(Ts) && Ts <= 0)
    objectUseAutogenNumOfPRBSPeriod = maskObj.Parameters.findobj('Name','UseAutogenNumOfPRBSPeriod');
    objectUseAutogenNumOfPRBSPeriod.Visible = 'off';
    objectUseAutogenPRBSSignalOrder = maskObj.Parameters.findobj('Name','UseAutogenPRBSSignalOrder');
    objectUseAutogenPRBSSignalOrder.Visible = 'off';
    objectNumOfPRBSPeriod = maskObj.Parameters.findobj('Name','NumOfPRBSPeriod');
    objectNumOfPRBSPeriod.Enabled = 'on';
    objectPRBSSignalOrder = maskObj.Parameters.findobj('Name','PRBSSignalOrder');
    objectPRBSSignalOrder.Enabled = 'on';
else
    objectUseAutogenNumOfPRBSPeriod = maskObj.Parameters.findobj('Name','UseAutogenNumOfPRBSPeriod');
    objectUseAutogenNumOfPRBSPeriod.Visible = 'on';
    objectUseAutogenPRBSSignalOrder = maskObj.Parameters.findobj('Name','UseAutogenPRBSSignalOrder');
    objectUseAutogenPRBSSignalOrder.Visible = 'on';
    freblkCallbackAutogenPRBSParams(blk);
end
end