function [args,additionalargs] = offlineNaiveBayesParameters(mdl,doclass,varargin)
%

%   Copyright 2021-2022 The MathWorks, Inc.

disallowedParams = {'Cost','DistributionNames','CategoricalPredictors','DistributionParameters'};
try
    if doclass
        modelType = "classification";
    else
        modelType = "regression";
    end
    cleanedupargs = incremental.utils.partialMatchParameters(disallowedParams,modelType,varargin{:});
    additionalargs = incremental.utils.validateDisallowedParameters(mdl,disallowedParams,cleanedupargs);
    args = struct();
    args.DistributionNames = mdl.DistributionNames;
    args.DistributionParameters = mdl.DistributionParameters;
    args.CategoricalPredictors = mdl.CategoricalPredictors;
    args.CategoricalLevels = mdl.CategoricalLevels;
    args.Cost = mdl.Cost;
    args.NumObservations = sum(classreg.learning.internal.classCount(mdl.ClassNames,mdl.Y));
    args.NumPredictors = size(mdl.DistributionParameters,2);
    args.WeightsPerClass = mdl.SumWeights;
    args.WeightedCounts = mdl.WeightedCounts;
catch ME
    throwAsCaller(ME);
end

end