import { Logger } from '../../render/Logger' ; import { sanitizeCombat } from './Combat' ; import { sanitizeDecision } from './Decision' ; import { TemplateBodyType , TemplateType } from './Templates' ; export function sanitizeTemplate ( type , attribs , body , line , defaultOutcome , log ) { switch ( type ) { case 'combat' : return sanitizeCombat ( attribs , body , line , defaultOutcome , log ) ; case 'decision' : return sanitizeDecision ( attribs , body , line , defaultOutcome , log ) ; case 'roleplay' : return { body , attribs } ; default : throw new Error ( 'unimplemented' ) ; } }