Documentation for this module may be created at ਮੌਡਿਊਲ:BookCSS/doc

local export = {}

function export.bookCss(frame)
	local bookFileName = frame:getParent().args[1]
	if not bookFileName then
		bookFileName = string.gsub(mw.title.getCurrentTitle().baseText, '/.+', '')
	end

	local bookCssName = 'Template:BookCSS/' .. bookFileName .. '.css'

	local bookCss = mw.title.new(bookCssName).exists and frame:extensionTag{
		name = "templatestyles", args = { src = bookCssName }
	} or ''

	return bookCss
end

return export