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