-- ROBLOX deviation: rewrote to replace ternary operators and reduce code repetition

local function getConfig(options: OptionsReceived?): Config
	return {
		callToJSON = getOption(options, "callToJSON"),
		-- ROBLOX deviation: color formatting omitted
		colors = nil,
		compareKeys = if options ~= nil and typeof(options.compareKeys) == "function"
			then options.compareKeys
			else DEFAULT_OPTIONS.compareKeys,
		escapeRegex = getOption(options, "escapeRegex"),
		escapeString = getOption(options, "escapeString"),
		indent = getIndent(options),
		maxDepth = getOption(options, "maxDepth"),
		min = getOption(options, "min"),
		plugins = getOption(options, "plugins"),
		printBasicPrototype = if options ~= nil and options.printBasicPrototype ~= nil
			then options.printBasicPrototype
			else true,
		printFunctionName = getOption(options, "printFunctionName"),
		spacingInner = getSpacingInner(options),
		spacingOuter = getSpacingOuter(options),
	}
end

function createIndent(indent: number): string
	-- ROBLOX deviation: used string repeat instead of a table join, also don't need the +1
	return string.rep(" ", indent)
end
