{"version":3,"sources":["../../../src/components/ReplyItem/index.js"],"names":["ReplyItem","props","state","showInput","handleToggleInput","bind","setState","commentId","replyItem","action","app","replyId","id","user_name","reply","content","sReplyFavor","favored","favor_count","reply_count","children","Component"],"mappings":";;;;;;;;;;;;;;AAAA;;;;AAGA;;;;AACA;;;;AACA;;;;;;;;;AAJA;;;IAMMA,S;;;AACJ,qBAAYC,KAAZ,EAAmB;AAAA;;AAAA,sHACXA,KADW;;AAEjB,UAAKC,KAAL,GAAa;AACXC,iBAAW;AADA,KAAb;AAGA,UAAKC,iBAAL,GAAyB,MAAKA,iBAAL,CAAuBC,IAAvB,OAAzB;AALiB;AAMlB;;;;wCAEmB;AAClB,WAAKC,QAAL,CAAc,EAAEH,WAAW,CAAC,KAAKD,KAAL,CAAWC,SAAzB,EAAd;AACD;;;6BAEQ;AAAA,mBACuC,KAAKF,KAD5C;AAAA,UACCM,SADD,UACCA,SADD;AAAA,UACYC,SADZ,UACYA,SADZ;AAAA,UACuBC,MADvB,UACuBA,MADvB;AAAA,UAC+BC,GAD/B,UAC+BA,GAD/B;;AAEP,UAAMC,UAAUH,UAAUI,EAA1B;AACA;;AAHO,UAKCT,SALD,GAKe,KAAKD,KALpB,CAKCC,SALD;;;AAOP,aACE;AAAA;AAAA,UAAK,WAAU,YAAf;AACE;AAAA;AAAA,YAAK,WAAU,oBAAf;AAAA;AACG;AAAA;AAAA;AAASK,sBAAUK;AAAnB,WADH;AAEGL,oBAAUM,KAAV,uBAA0BN,UAAUM,KAAV,CAAgBD,SAA1C,GAAwD,IAF3D;AAAA;AAIGL,oBAAUO;AAJb,SADF;AAOE;AAAA;AAAA,YAAK,WAAU,iBAAf;AACE;AAAA;AAAA,cAAM,WAAU,iBAAhB;AACE;AACE,oBAAK,OADP;AAEE,uBAAS,mBAAM;AACb;AACA;AACAL,oBAAIM,WAAJ,CAAgBR,UAAUI,EAA1B,EAA8BL,SAA9B,EAAyCC,UAAUS,OAAnD;AACA;AACA;AACA;AACD,eATH;AAUE,yBACET,UAAUS,OAAV,GACI,+BADJ,GAEI;AAbR,cADF;AAAA;AAiBUT,sBAAUU;AAjBpB,WADF;AAoBE;AAAA;AAAA,cAAM,WAAU,iBAAhB;AACE,4DAAM,MAAK,SAAX,EAAqB,SAAS,KAAKd,iBAAnC,GADF;AAAA;AACkE,eADlE;AAEGI,sBAAUW,WAAV,IAAyB;AAF5B;AApBF,SAPF;AAgCGhB,qBACC,8BAAC,sBAAD;AACE,mBAASO,IAAIU,QADf;AAEE,kBAAQX,MAFV;AAGE,mBAASE,OAHX;AAIE,qBAAWJ,SAJb;AAKE,oBAAU,KAAKH;AALjB;AAjCJ,OADF;AA4CD;;;;EAhEqBiB,gB;;kBAmET,uBAAQrB,SAAR,C","file":"index.js","sourcesContent":["import React, { Component } from \"react\";\n// import PropTypes from 'prop-type';\nimport { Icon } from \"antd\";\nimport Comment from \"../../Comment\";\nimport CommentInput from \"../CommentInput\";\nimport \"./index.css\";\n\nclass ReplyItem extends Component {\n constructor(props) {\n super(props);\n this.state = {\n showInput: false\n };\n this.handleToggleInput = this.handleToggleInput.bind(this);\n }\n\n handleToggleInput() {\n this.setState({ showInput: !this.state.showInput });\n }\n\n render() {\n const { commentId, replyItem, action, app } = this.props;\n const replyId = replyItem.id;\n // console.log('replyId', replyId);\n\n const { showInput } = this.state;\n\n return (\n
\n
\n @{replyItem.user_name}\n {replyItem.reply ? ` 回复 @${replyItem.reply.user_name}` : null}:\n  \n {replyItem.content}\n
\n
\n \n {\n // if (replyId) {\n // 如果有 replyId,则说明是评论的回复\n app.sReplyFavor(replyItem.id, commentId, replyItem.favored);\n // return;\n // }\n // app.sCommentFavor(replyItem.id, replyItem.favored);\n }}\n className={\n replyItem.favored\n ? \"comment-favor comment-favored\"\n : \"comment-favor\"\n }\n />\n   {replyItem.favor_count}\n \n \n  {\" \"}\n {replyItem.reply_count || 0}\n \n
\n {showInput && (\n \n )}\n
\n );\n }\n}\n\nexport default Comment(ReplyItem);\n"]}