import { A_Frame } from "@adaas/a-frame/core" import { AreDeclaration, AreInstructionSerialized } from "@adaas/are"; import { AreHtmlAddElementInstructionPayload } from "./AreHTML.instructions.types"; import { AreHTMLInstructions } from "./AreHTML.instructions.constants"; @A_Frame.Define({ namespace: 'a-are-html', description: 'Creates a new HTML element in the DOM. Apply creates the element; revert removes it.' }) export class AddElementInstruction extends AreDeclaration { constructor( props: AreHtmlAddElementInstructionPayload | AreInstructionSerialized ) { if ('aseid' in props) { super(props); } else { super(AreHTMLInstructions.AddElement, props); } } }