-- Display name in report when matcher fails same as in snapshot file,
-- but with optional hint argument in bold weight.

local function printSnapshotName(concatenatedBlockNames_: string?, hint_: string?, count: number): string
	local concatenatedBlockNames = if concatenatedBlockNames_ then concatenatedBlockNames_ else ""
	local hint = if hint_ then hint_ else ""
	local hasNames = concatenatedBlockNames:len() ~= 0
	local hasHint = #hint ~= 0

	local retval = "Snapshot name: `"
	if hasNames then
		retval = retval .. utils.escapeBacktickString(concatenatedBlockNames)
	end

	if hasNames and hasHint then
		retval = retval .. ": "
	end

	if hasHint then
		retval = retval .. BOLD_WEIGHT(utils.escapeBacktickString(hint))
	end

	retval = retval .. " " .. count .. "`"

	return retval
end
