local mHatnote = require('Module:Hatnote')
local mHatlist = require('মডিউল:হাটনোট তালিকা')
local mArguments --initialize lazily
local mTableTools --initialize lazily
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
local suff = require('Module:এর ২').main
function p.distinguish(frame)
mArguments = require('Module:Arguments')
mTableTools = require('Module:টেবিল সরঞ্জাম')
local args = mArguments.getArgs(frame)
local selfref = args.selfref
local text = args.text and suff(args.text) or nil -- Process only if text is provided
args = mTableTools.compressSparseArray(args)
return p._distinguish(args, text, selfref)
end
function p._distinguish(args, text, selfref)
checkType("_distinguish", 1, args, 'table')
-- Return an empty string if no arguments or text is provided
if #args == 0 and not text then
return ''
end
local listResult = mHatlist.orList(args, true)
local list = suff(listResult)
local finalText = string.format(
'%s সাথে মিলিয়ে ফেলবেন না।',
text or list
)
-- Pass the message to `mHatnote._hatnote`
local hnOptions = {selfref = selfref}
return mHatnote._hatnote(finalText, hnOptions)
end
return p