"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("./callbar-button-constants.cjs"),r=require("../../common/utils/index.cjs"),t=require("vue"),s=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),d=require("../button/button.cjs"),u=require("../tooltip/tooltip.cjs"),c={compatConfig:{MODE:3},name:"DtRecipeCallbarButton",components:{DtButton:d.default,DtTooltip:u.default},inheritAttrs:!1,props:{id:{type:String,default(){return r.default.getUniqueString()}},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>n.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},importance:{type:String,default:""},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["click"],computed:{callbarButtonClass(){return[this.buttonClass,"d-recipe-callbar-button",{"d-recipe-callbar-button--circle":this.circle,"d-recipe-callbar-button--active":this.active,"d-recipe-callbar-button--danger":this.danger,"d-btn--disabled":this.disabled}]},callbarButtonTextClass(){return["d-recipe-callbar-button__text",this.textClass]},buttonWidth(){switch(this.buttonWidthSize){case"sm":return"4.5rem";case"md":return"6rem";default:return"8.4rem"}},buttonImportance(){return this.importance?this.importance:this.circle?"outlined":"clear"},callbarButtonListeners(){return{...r.extractVueListeners(this.$attrs),click:e=>this.$emit("click",e)}}},methods:{removeClassStyleAttrs:r.removeClassStyleAttrs,addClassStyleAttrs:r.addClassStyleAttrs}};function b(e,f,l,m,h,a){const o=t.resolveComponent("dt-button"),i=t.resolveComponent("dt-tooltip");return t.openBlock(),t.createBlock(i,t.mergeProps({id:l.id,inverted:l.invertedTooltip},a.addClassStyleAttrs(e.$attrs),{delay:l.tooltipDelay,show:l.showTooltip,offset:[0,24]}),{anchor:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass({"d-recipe-callbar-button--disabled":l.disabled})},[t.createVNode(o,t.mergeProps({importance:a.buttonImportance,kind:"muted","icon-position":"top","aria-disabled":l.disabled,"aria-label":l.ariaLabel,"label-class":a.callbarButtonTextClass,width:a.buttonWidth,class:a.callbarButtonClass},a.removeClassStyleAttrs(e.$attrs),t.toHandlers(a.callbarButtonListeners)),{icon:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["importance","aria-disabled","aria-label","label-class","width","class"])],2)]),default:t.withCtx(()=>[t.renderSlot(e.$slots,"tooltip",{},()=>[t.createTextVNode(t.toDisplayString(l.tooltipText),1)])]),_:3},16,["id","inverted","delay","show"])}const p=s._(c,[["render",b]]);exports.default=p;
//# sourceMappingURL=callbar-button.cjs.map
