var Unibase;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){class i extends n.Platform.Core.BaseComponent{constructor(){super();this.commentcount=0}cssFiles(){return[""]}jsFiles(){return[""]}html(n,t){let i=`
Comments (0)
`;return $("."+t).html(i),""}init(t){var i=this,r,u;i.html("",t);r="";u=n.Themes.Providers.DetailHelper.installedAppId;i.InstalledAppId=u;for(let n of n.Themes.Providers.Detail_Settings.Instance().InputParameters)n.Key==="hf_"+u+"_recordid"&&(r=n.Value);i.load(r,t,null)}load(){var t=this;t.currentuser=n.Platform.Membership.Infos.Identity.currentUser;t.showComments()}showComments(){var n=this,t;$(".allComments_").remove();t='
<\/div>
`,c=0;c <\/i><\/span> <\/a><\/span><\/div>'),u=" ",r.FromUserPhotoUrl==null||r.FromUserPhotoUrl=="")if(r.ImageUrl==null){let n="",t=r.FromUserName,i=t.match(/\b(\w)/g);n=i.length==1?$.trim(t).substr(0,2):i.join("").slice(0,2);u=`
${n}
`}else u=`img`;else{u=r.FromUserPhotoUrl;let n=u.split("/");if(n[n.length-1]=="unnamed.png"||u==null||u==""){let n="",t=r.FromUserName,i=t.match(/\b(\w)/g);n=i.length==1?$.trim(t).substr(0,2):i.join("").slice(0,2);u=`
${n}
`}else u=`img`}p="";p=r.ImageUrl==null||r.ImageUrl==""?"":"";var e="",o="",b="",a=`Replies`;a+=` (${r.ParentCommentCount}) `;r.ParentCommentCount==0&&(a=`Reply`+``);r.CommentType==n.Platform.Automation.Enums.CommentType.Comment||(r.CommentType==n.Platform.Automation.Enums.CommentType.Call?(e="fa fa-phone text-info",o="Call"):r.CommentType==n.Platform.Automation.Enums.CommentType.Mail?(e="fa fa-envelope-o text-info",o="Mail"):r.CommentType==n.Platform.Automation.Enums.CommentType.Meeting?(e="fa fa-users text-info ",o="Meeting"):r.CommentType==n.Platform.Automation.Enums.CommentType.Follow&&(e="fa fa-flash text-info",o="Event",b="hidden"));$("#hfCommentids").val()!=r.CommentId&&($("#hfCommentids").val()!="0"&&(f+="<\/section><\/article><\/div>"),$("#hfCommentids").val(r.CommentId),f+=r.ParentCommentCount>0?'
'+u+'<\/div><\/span><\/div>
'+r.FromUserName+'<\/h6><\/div>':'
'+u+'<\/div><\/span><\/div>
'+r.FromUserName+'<\/h6><\/div>',r.IsSystemGenerated!=!0&&(f+=window.innerWidth<=1198?l+'<\/div>
'+r.CommentSubject+" <\/span><\/div>":l+'<\/div>
'+r.CommentSubject+" <\/span><\/div>"));f+='
<\/i> '+o+"<\/a><\/span>";r.IsSystemGenerated!=!0&&(f+=window.innerWidth<=1198?' '+a+'<\/a><\/span><\/div> '+n.Platform.Helpers.DateTimeHelper.Instance().commentsdateformat(r.CreatedDate)+'<\/span><\/div>