local frame = mw.getCurrentFrame()

local function is_preview()
	local revision_id = frame:preprocess('{{REVISIONID}}')

	return revision_id == nil or revision_id == ''
end

local function templatestyles()
	return frame:extensionTag{
		name = 'templatestyles', args = { src = 'Module:If preview/styles.css' }
	}
end

return {
	preview = is_preview(),
	templatestyles = templatestyles(),
	warning_infrastructure = '%s<div class="preview-warning"><strong>Aviso:</strong> %s</div>',
	missing_warning = 'A predefinição não tem texto de aviso.'
}