Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../avatar/avatar.cjs`),r=require(`../emoji-text-wrapper/emoji-text-wrapper.cjs`),i=require(`../general-row/general-row.cjs`);let a=require(`vue`),o=require(`@dialpad/dialtone-icons/vue3`);var s={compatConfig:{MODE:3},name:`DtRecipeContactRow`,components:{DtAvatar:n.default,DtRecipeGeneralRow:i.default,DtEmojiTextWrapper:r.default,DtIconUser:o.DtIconUser},inheritAttrs:!1,props:{avatarSrc:{type:String,default:``},avatarPresence:{type:String,default:null},avatarSeed:{type:String,default:null},avatarColor:{type:String,default:null},presenceText:{type:String,default:``},name:{type:String,required:!0},userStatus:{type:String,default:``},muted:{type:Boolean,default:!1},unreadCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},noInitials:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},hasCallButton:{type:Boolean,default:!0}},emits:[`call`],computed:{presenceFontColorClass(){return{active:`d-recipe-contact-row--active`,busy:`d-recipe-contact-row--busy`,away:`d-recipe-contact-row--away`}[this.avatarPresence]},contactRowListeners(){return e.extractVueListeners(this.$attrs)},contactDescription(){return e.safeConcatStrings([this.name,this.presenceText,this.userStatus])}}},c={class:`d-recipe-leftbar-row__status`};function l(e,t,n,r,i,o){let s=(0,a.resolveComponent)(`dt-icon-user`),l=(0,a.resolveComponent)(`dt-avatar`),u=(0,a.resolveComponent)(`dt-emoji-text-wrapper`),d=(0,a.resolveComponent)(`dt-recipe-general-row`);return(0,a.openBlock)(),(0,a.createBlock)(d,(0,a.mergeProps)({"unread-count":n.unreadCount,description:o.contactDescription,"has-unreads":n.hasUnreads,selected:n.selected,"has-call-button":n.hasCallButton,muted:n.muted,"is-typing":n.isTyping},e.$attrs,{"data-qa":`contact-row`},(0,a.toHandlers)(o.contactRowListeners),{onCall:t[0]||(t[0]=t=>e.$emit(`call`,t))}),{left:(0,a.withCtx)(()=>[(0,a.createVNode)(l,{"full-name":n.name,"image-src":n.avatarSrc,color:n.avatarColor,"image-alt":``,size:`sm`,seed:n.avatarSeed,presence:n.avatarPresence},(0,a.createSlots)({_:2},[n.noInitials?{name:`icon`,fn:(0,a.withCtx)(()=>[(0,a.createVNode)(s,{size:`200`})]),key:`0`}:void 0]),1032,[`full-name`,`image-src`,`color`,`seed`,`presence`])]),label:(0,a.withCtx)(()=>[(0,a.createVNode)(u,{class:`d-recipe-leftbar-row__description`,"data-qa":`dt-recipe-leftbar-row-description`,size:`200`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(n.name),1)]),_:1}),(0,a.createElementVNode)(`div`,c,[n.presenceText?((0,a.openBlock)(),(0,a.createElementBlock)(`span`,{key:0,"data-qa":`dt-recipe-leftbar-row-presence-text`,class:(0,a.normalizeClass)([`d-recipe-leftbar-row__meta-context`,o.presenceFontColorClass])},(0,a.toDisplayString)(n.presenceText),3)):(0,a.createCommentVNode)(``,!0),n.userStatus?((0,a.openBlock)(),(0,a.createBlock)(u,{key:1,size:`100`,"element-type":`span`,"data-qa":`dt-recipe-leftbar-row-user-status`,class:`d-recipe-leftbar-row__meta-custom`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(n.userStatus),1)]),_:1})):(0,a.createCommentVNode)(``,!0)])]),_:1},16,[`unread-count`,`description`,`has-unreads`,`selected`,`has-call-button`,`muted`,`is-typing`])}var u=t.t(s,[[`render`,l]]);exports.default=u;
//# sourceMappingURL=contact-row.cjs.map