1import{a as S}from"./chunk-RIVQXRHM.js";import"./chunk-HW4XKXKY.js";import{d as C}from"./chunk-LI3MKOXX.js";import{Jc as g,Ka as i,Rb as a,S as c,Sb as u,Tb as s,Va as b,ba as x,bc as d,cc as f,dc as E,ha as l,jb as p,ob as h,pb as y,ub as n,vb as o,wb as v}from"./chunk-MYPHZRM6.js";import"./chunk-7CGTOI24.js";var _=(t,r)=>r.id;function D(t,r){if(t&1&&(n(0,"li",1),v(1,"div",3),n(2,"div",4)(3,"div",5)(4,"div",6),a(5),o(),n(6,"div")(7,"p",7),a(8),o(),n(9,"time",8),a(10),d(11,"date"),o()()()(),n(12,"p",9),a(13),o()()),t&2){let e=r.$implicit;i(5),s(" ",(e.authorName||"?")[0]==null?null:(e.authorName||"?")[0].toUpperCase()," "),i(3),u(e.authorName),i(),p("datetime",e.createdAt),i(),s(" ",E(11,5,e.createdAt,"mediumDate")," "),i(3),u(e.content)}}function L(t,r){t&1&&(n(0,"li",2),a(1),d(2,"transloco"),o()),t&2&&(i(),s(" ",f(2,1,"comments.empty")," "))}var R=(()=>{class t{set storyId(e){this._storyId.set(e),e&&this.loadComments()}constructor(){this._storyId=l(0),this.commentService=c(S),this.destroyRef=c(x),this.comments=l([]),this.commentsLoadSub=null,this.destroyRef.onDestroy(()=>this.commentsLoadSub?.unsubscribe())}loadComments(){let e=this._storyId();e&&(this.commentsLoadSub?.unsubscribe(),this.commentsLoadSub=this.commentService.getCommentsByStoryId({storyId:e}).subscribe({next:m=>this.comments.set(m),error:()=>this.comments.set([])}))}static{this.\u0275fac=function(m){return new(m||t)}}static{this.\u0275cmp=b({type:t,selectors:[["app-comment-list"]],inputs:{storyId:"storyId"},decls:5,vars:4,consts:[[1,"space-y-5"],[1,"brand-surface","bg-cream-deep","p-5","relative"],[1,"text-center","py-8","text-ancestral/75","font-display","text-xs","uppercase","tracking-wider"],["aria-hidden","true",1,"absolute","-left-2","top-6","w-4","h-4","rotate-45","bg-cream-deep","border-l-2","border-b-2","border-ancestral"],[1,"flex","flex-wrap","items-center","justify-between","gap-2","mb-2"],[1,"flex","items-center","gap-3"],["aria-hidden","true",1,"w-10","h-10","rounded-full","bg-palm","text-white","flex","items-center","justify-center","font-display","text-sm","brand-border-ancestral-2"],[1,"font-display","text-sm","text-palm","leading-tight"],[1,"text-xs","text-ancestral/75"],[1,"text-ancestral/90","leading-relaxed","pl-13","sm:pl-14","mt-2"]],template:function(m,I){m&1&&(n(0,"ul",0),d(1,"transloco"),h(2,D,14,8,"li",1,_,!1,L,3,3,"li",2),o()),m&2&&(p("aria-label",f(1,2,"comments.listAria")),i(2),y(I.comments()))},dependencies:[g,C],encapsulation:2,changeDetection:0})}}return t})();export{R as CommentListComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.