{"version":3,"sources":["../../../src/instructions/AddComment.instruction.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,qBAAA,GAAN,cAAoC,cAAA,CAAoD;AAAA,EAE3F,IAAI,OAAA,GAAU;AACV,IAAA,OAAO,KAAK,OAAA,CAAQ,OAAA;AAAA,EACxB;AAAA,EAEA,YACI,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAsE,CAAA;AAAA,IAChF,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,mBAAA,CAAoB,YAAY,KAAK,CAAA;AAAA,IAC/C;AAAA,EACJ;AACJ;AAfa,qBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,qBAAA,CAAA","file":"AddComment.instruction.mjs","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlAddCommentInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n    namespace: 'a-are-html',\n    description: 'Appends a comment node to an element. Apply creates the comment node; revert removes it. Content can be a static string or a dynamic getter for interpolations.'\n})\nexport class AddCommentInstruction extends AreDeclaration<AreHtmlAddCommentInstructionPayload> {\n\n    get content() {\n        return this.payload.content;\n    }\n\n    constructor(\n        props: AreHtmlAddCommentInstructionPayload | AreInstructionSerialized<AreHtmlAddCommentInstructionPayload>\n    ) {\n        if ('aseid' in props) {\n            super(props as AreInstructionSerialized<AreHtmlAddCommentInstructionPayload>);\n        } else {\n            super(AreHTMLInstructions.AddComment, props);\n        }\n    }\n}\n"]}