import{__decorate}from"tslib";import{SuperComponent,wxComponent}from"../../common/src/index";import config from"../../common/config";const{prefix:prefix}=config,name=`${prefix}-chat-markdown`;let ChatMarkdownNode=class extends SuperComponent{constructor(){super(...arguments),this.options={multipleSlots:!0},this.properties={nodes:{type:Array,value:()=>[]}},this.data={classPrefix:name},this.methods={linkClick(t){var e;const{index:a}=t.currentTarget.dataset||{},r=null===(e=this.data.nodes)||void 0===e?void 0:e[a];this.handleClick(t,"link-tap",r)},getCareMarkdown(){if(this.data.careMarkdown)return this.data.careMarkdown;for(this.setData({careMarkdown:this.selectOwnerComponent()});this.data.careMarkdown.__data__.name!==name;this.setData({careMarkdown:this.data.careMarkdown.selectOwnerComponent()}));return this.data.careMarkdown},handleClick(t,e,a){this.data.getCareMarkdown().triggerEvent("click",{event:t,node:a})}},this.lifetimes={created(){this.data.getCareMarkdown=this.getCareMarkdown.bind(this),this.data.handleClick=this.handleClick.bind(this)},attached(){},detached(){}}}};ChatMarkdownNode=__decorate([wxComponent()],ChatMarkdownNode);export default ChatMarkdownNode;