function [args,additionalargs] = offlineTemplateSVMParameters(mdl,modelType,varargin)
%

%   Copyright 2022-2023 The MathWorks, Inc.

disallowedParams = {'Beta','Bias','Learner',...
    'Epsilon','Mu','Sigma','FitBias','BatchIndex'};

svmParamsList = [{'Solver','BatchSize','Lambda','LearnRate','LearnRateSchedule',...
    'EstimationPeriod','Shuffle','Standardize'},disallowedParams];

try
    if isa(mdl,'classreg.learning.FitTemplate')
        mdl = fillIfNeeded(mdl,modelType);
    end

    cleanedupargs = incremental.utils.partialMatchParameters(svmParamsList,modelType,varargin{:});
    additionalargs = incremental.utils.validateDisallowedParameters(mdl,disallowedParams,cleanedupargs);
    
    if ~isempty(mdl.ModelParams.KernelFunction)
        assert(isequal(mdl.ModelParams.KernelFunction,'linear'),message('stats:incremental:Template:SVMNonLinearKernel'));
    end

    args = struct();

    args.Learner = 'svm';

    if ~isempty(mdl.ModelParams.StandardizeData)
        args.Standardize = mdl.ModelParams.StandardizeData;
    end
    
    if ~isempty(mdl.ModelParams.Epsilon)
        args.Epsilon = mdl.ModelParams.Epsilon;
    end

catch ME
    throwAsCaller(ME);
end

end
