"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./callbar-button-constants.cjs"),n=require("../../common/utils/index.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../button/button.cjs"),o=require("../tooltip/tooltip.cjs"),s={name:"DtRecipeCallbarButton",components:{DtButton:i.default,DtTooltip:o.default},inheritAttrs:!1,props:{id:{type:String,default(){return n.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=>a.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{...this.$listeners,click:e=>this.$emit("click",e)}}}};var u=function(){var t=this,l=t._self._c;return l("dt-tooltip",{attrs:{id:t.id,inverted:t.invertedTooltip,delay:t.tooltipDelay,show:t.showTooltip,offset:[0,24]},scopedSlots:t._u([{key:"anchor",fn:function(){return[l("span",{class:{"d-recipe-callbar-button--disabled":t.disabled}},[l("dt-button",t._g(t._b({class:t.callbarButtonClass,attrs:{importance:t.buttonImportance,kind:"muted","icon-position":"top","aria-disabled":t.disabled,"aria-label":t.ariaLabel,"label-class":t.callbarButtonTextClass,width:t.buttonWidth},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},"dt-button",t.$attrs,!1),t.callbarButtonListeners),[t._t("default")],2)],1)]},proxy:!0}],null,!0)},[t._t("tooltip",function(){return[t._v(" "+t._s(t.tooltipText)+" ")]})],2)},c=[],d=r.n(s,u,c);const p=d.exports;exports.default=p;
//# sourceMappingURL=callbar-button.cjs.map
