Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`../avatar/avatar.cjs`),n=require(`../badge/badge.cjs`),r=require(`./callbox-constants.cjs`);let i=require(`vue`),a=require(`@dialpad/dialtone-icons/vue3`);var o={compatConfig:{MODE:3},name:`DtRecipeCallbox`,components:{DtBadge:n.default,DtAvatar:t.default,DtIconPause:a.DtIconPause},inheritAttrs:!1,props:{badgeText:{type:String,default:``},badgeColor:{type:String,default:null,validator:e=>e===null||Object.keys(r.CALLBOX_BADGE_COLORS).includes(e)},avatarSrc:{type:String,default:``},avatarFullName:{type:String,default:``},avatarSeed:{type:String,default:``},title:{type:String,default:``},borderColor:{type:String,default:`default`,validator:e=>Object.keys(r.CALLBOX_BORDER_COLORS).includes(e)},clickable:{type:Boolean,default:!1},isOnHold:{type:Boolean,default:!1}},emits:[`click`],computed:{shouldShowAvatar(){return this.avatarFullName||this.avatarSrc},badgeClass(){return r.CALLBOX_BADGE_COLORS[this.badgeColor]},borderClass(){return r.CALLBOX_BORDER_COLORS[this.borderColor]}},methods:{handleClick(e){this.clickable&&this.$emit(`click`,e)}}},s={key:0,"data-qa":`dt-recipe-callbox__video-wrapper`,class:`d-recipe-callbox__video`},c={class:`d-recipe-callbox__main-content-top`},l={class:`d-recipe-callbox__content`},u={key:0,"data-qa":`dt-recipe-callbox__badge-wrapper`,class:`d-recipe-callbox__content-badge`},d={key:1,"data-qa":`dt-recipe-callbox__subtitle-wrapper`,class:`d-recipe-callbox__content-subtitle`},f={key:1,"data-qa":`dt-recipe-callbox__right-wrapper`,class:`d-recipe-callbox__right`},p={key:0,"data-qa":`dt-recipe-callbox__bottom-wrapper`,class:`d-recipe-callbox__main-content-bottom`};function m(e,t,n,r,a,o){let m=(0,i.resolveComponent)(`dt-icon-pause`),h=(0,i.resolveComponent)(`dt-avatar`),g=(0,i.resolveComponent)(`dt-badge`),_=(0,i.resolveDirective)(`dt-tooltip`);return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,{"data-qa":`dt-recipe-callbox`,class:(0,i.normalizeClass)([e.$attrs.class,`d-recipe-callbox`]),style:(0,i.normalizeStyle)(e.$attrs.style)},[e.$slots.video?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,s,[(0,i.renderSlot)(e.$slots,`video`)])):(0,i.createCommentVNode)(``,!0),(0,i.createElementVNode)(`div`,{"data-qa":`dt-recipe-callbox__main-content`,class:(0,i.normalizeClass)([`d-recipe-callbox__main-content`,o.borderClass,{"d-recipe-callbox--clickable":n.clickable}])},[(0,i.createElementVNode)(`div`,c,[o.shouldShowAvatar?((0,i.openBlock)(),(0,i.createBlock)(h,{key:0,"avatar-class":`d-recipe-callbox__avatar`,"image-src":n.avatarSrc,"image-alt":``,"full-name":n.avatarFullName,seed:n.avatarSeed,clickable:n.clickable,size:`sm`,onClick:o.handleClick},(0,i.createSlots)({_:2},[n.isOnHold?{name:`overlayIcon`,fn:(0,i.withCtx)(()=>[(0,i.createVNode)(m)]),key:`0`}:void 0]),1032,[`image-src`,`full-name`,`seed`,`clickable`,`onClick`])):(0,i.createCommentVNode)(``,!0),(0,i.createElementVNode)(`div`,l,[(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(n.clickable?`button`:`span`),{"data-qa":`dt-recipe-callbox__title`,class:`d-recipe-callbox__content-title`,tabindex:`0`,onClick:o.handleClick},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(n.title),1)]),_:1},8,[`onClick`])),[[_,n.title]]),e.$slots.badge||n.badgeText?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,u,[(0,i.renderSlot)(e.$slots,`badge`,{},()=>[(0,i.createVNode)(g,{class:(0,i.normalizeClass)(o.badgeClass),text:n.badgeText},null,8,[`class`,`text`])])])):(0,i.createCommentVNode)(``,!0),e.$slots.subtitle?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,d,[(0,i.renderSlot)(e.$slots,`subtitle`)])):(0,i.createCommentVNode)(``,!0)]),e.$slots.right?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,f,[(0,i.renderSlot)(e.$slots,`right`)])):(0,i.createCommentVNode)(``,!0)]),e.$slots.bottom?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,p,[(0,i.renderSlot)(e.$slots,`bottom`)])):(0,i.createCommentVNode)(``,!0)],2)],6)}var h=e.t(o,[[`render`,m]]);exports.default=h;
//# sourceMappingURL=callbox.cjs.map