"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("../_util/props-util/index.js"),A=require("../_util/type.js"),s=require("../_util/vue-types/index.js"),S=require("../config-provider/hooks/useConfigInject.js"),D=require("./style/index.js"),m=()=>({actions:Array,author:s.default.any,avatar:s.default.any,content:s.default.any,prefixCls:String,datetime:s.default.any}),b=e.defineComponent({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:m(),slots:Object,setup(a,{slots:o,attrs:d}){const{prefixCls:l,direction:v}=S.default("comment",a),[f,h]=D.default(l),$=(t,n)=>e.createVNode("div",{class:`${t}-nested`},[n]),N=t=>!t||!t.length?null:t.map((r,c)=>e.createVNode("li",{key:`action-${c}`},[r]));return()=>{const t=l.value,n=a.actions??o.actions?.(),r=a.author??o.author?.(),c=a.avatar??o.avatar?.(),V=a.content??o.content?.(),u=a.datetime??o.datetime?.(),y=e.createVNode("div",{class:`${t}-avatar`},[typeof c=="string"?e.createVNode("img",{src:c,alt:"comment-avatar"},null):c]),g=n?e.createVNode("ul",{class:`${t}-actions`},[N(Array.isArray(n)?n:[n])]):null,C=e.createVNode("div",{class:`${t}-content-author`},[r&&e.createVNode("span",{class:`${t}-content-author-name`},[r]),u&&e.createVNode("span",{class:`${t}-content-author-time`},[u])]),p=e.createVNode("div",{class:`${t}-content`},[C,e.createVNode("div",{class:`${t}-content-detail`},[V]),g]),q=e.createVNode("div",{class:`${t}-inner`},[y,p]),i=x.flattenChildren(o.default?.());return f(e.createVNode("div",{...d,class:[t,{[`${t}-rtl`]:v.value==="rtl"},d.class,h.value]},[q,i&&i.length?$(t,i):null]))}}}),j=A.withInstall(b);exports.commentProps=m;exports.default=j;
