function json = getAllParamValueStatusForDialog(obj)
% getAllParamValueStatusForDialog override version of BaseConfig::getDialogData
% This method can be removed when the HDL team converts all CLI parameters
% to standard HDL parameters

%   Copyright 2015-2023 The MathWorks, Inc.

json = {};
cli = obj.CLI;
if isempty(cli) || ~isa(cli,'hdlcoderprops.CLI')
    return;
end

% If the data model captures all HDL parameters' default value correctly,
% we can only send non-default values at run-time:
%
% >> props = cli.getNonDefaultHDLCoderProps;
%
% Now the HDL data model is a work in progress, 
% we always send all parameters value at run-time, g1429584
% 
% We will revert it back to the non-default version when the HDL
% data model is complete, g1430204
props = cli.getAllHDLCoderProps(false); % false: no hidden parameters

% Test if configset is locked
cs = obj.getConfigSet;
if isempty(cs)
    isReadOnly = false;
else
    isReadOnly = strcmp(cs.ReadOnly, 'on');
end

n = length(props);
arr = cell(n,1);
fcn = @configset.internal.util.partialConversionToJSON;
for i = 1:n
    name = props{i};
    value = cli.(name);
    if isnumeric(value) && isscalar(value)
        value = num2str(value);
    end
    value = fcn(value);
    arr{i} = {name; value; isReadOnly};
end

json = arr;

% LocalWords:  cli
