{"version":3,"sources":["https://lively-kernel.org/lively4/lively4-jsx/src/client/reactive/components/rewritten/conduit/src/components/comment-input-rp19.js"],"names":["ReactiveMorph","commentStore","CommentInput","constructor","onCommentForm","event","createComment","body","preventDefault","render"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEOA,mB;;AACAC,kB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEQ,YAAMC,YAAN,SAA2BF,aAA3B,CAAyC;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;;AAEtDG,sBAAc;AACZ;AACA,sCAAe,EAAf;AACD;;AAED;;AAEAC,sBAAcC,KAAd,EAAqB;AAAA;;AACnB,gOAAaC,aAAb,CAA2B,EAAEC,iBAAM,IAAN,YAAF,EAA3B,aACQ;AAAM,+CAAe,EAAf;AAAN,WADR;AADmB;AAGnB,iGAAMC,cAAN;AACD;;AAEDC,iBAAS;AACP,4EACW,aADX,oCAC+B,mBAD/B,mHAEe,YAFf,uHAIW,iBAJX,oCAKc,cALd,0CAMoB,oBANpB,4CAOgB,IAPhB,wJAQmBR,YARnB,0DASa,GATb,0CASmB,IATnB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oHAWe,aAXf,iJAac,IAbd,wEAcc,oBAdd,kCAeY,EAfZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yHAkBc,wBAlBd,mCAmBa,QAnBb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BD;;AA1CqD;AAAA;AAAA;AAAA,kHAiBzC,aAjByC,KAoBzC,iBApByC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAuBpC,IAvBoC;AAAA;AAAA;;AAAA;;yBAAnCC,Y","file":"comment-input-rp19.js","sourcesContent":["'enable rp19-jsx';\n\nimport ReactiveMorph from 'src/client/reactive/components/rewritten/conduit/rpComponents/reactiveMorph.js';\nimport commentStore from 'src/client/reactive/components/rewritten/conduit/src/stores/commentStore.js';\n\nexport default class CommentInput extends ReactiveMorph {\n  \n  constructor() {\n    super();\n    this.comment = '';\n  }\n  \n  /* Event handler */\n  \n  onCommentForm(event) {\n    commentStore.createComment({ body: this.comment })\n      .then(() => this.comment = '');\n    event.preventDefault();\n  }  \n  \n  render() {\n    return (\n      <form id='commentForm' class='card comment-form'>\n        <div class='card-block'>\n          <textarea \n            id='commentTextArea'\n            class='form-control'\n            placeholder='Write a comment...'\n            value={ this.comment }\n            disabled={ commentStore.isCreatingComment }\n            rows='3'>{ this.comment }</textarea>\n        </div>\n        <div class='card-footer'>\n          <img\n            src={ this.props.currentUser.image }\n            class='comment-author-img'\n            alt=''\n          />\n          <button\n            class='btn btn-sm btn-primary'\n            type='submit'\n          >\n            Post Comment\n          </button>\n        </div>\n      </form>\n    );  \n  }\n}"]}