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(`../button/button.cjs`),r=require(`../tooltip/tooltip.cjs`),i=require(`./callbar-button-constants.cjs`);let a=require(`vue`);var o={compatConfig:{MODE:3},name:`DtRecipeCallbarButton`,components:{DtButton:n.default,DtTooltip:r.default},inheritAttrs:!1,props:{id:{type:String,default(){return e.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=>i.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{...e.extractVueListeners(this.$attrs),click:e=>this.$emit(`click`,e)}}},methods:{removeClassStyleAttrs:e.removeClassStyleAttrs,addClassStyleAttrs:e.addClassStyleAttrs}};function s(e,t,n,r,i,o){let s=(0,a.resolveComponent)(`dt-button`),c=(0,a.resolveComponent)(`dt-tooltip`);return(0,a.openBlock)(),(0,a.createBlock)(c,(0,a.mergeProps)({id:n.id,inverted:n.invertedTooltip},o.addClassStyleAttrs(e.$attrs),{delay:n.tooltipDelay,show:n.showTooltip,offset:[0,24]}),{anchor:(0,a.withCtx)(()=>[(0,a.createElementVNode)(`span`,{class:(0,a.normalizeClass)({"d-recipe-callbar-button--disabled":n.disabled})},[(0,a.createVNode)(s,(0,a.mergeProps)({importance:o.buttonImportance,kind:`muted`,"icon-position":`top`,"aria-disabled":n.disabled,"aria-label":n.ariaLabel,"label-class":o.callbarButtonTextClass,width:o.buttonWidth,class:o.callbarButtonClass},o.removeClassStyleAttrs(e.$attrs),(0,a.toHandlers)(o.callbarButtonListeners)),{icon:(0,a.withCtx)(()=>[(0,a.renderSlot)(e.$slots,`icon`)]),default:(0,a.withCtx)(()=>[(0,a.renderSlot)(e.$slots,`default`)]),_:3},16,[`importance`,`aria-disabled`,`aria-label`,`label-class`,`width`,`class`])],2)]),default:(0,a.withCtx)(()=>[(0,a.renderSlot)(e.$slots,`tooltip`,{},()=>[(0,a.createTextVNode)((0,a.toDisplayString)(n.tooltipText),1)])]),_:3},16,[`id`,`inverted`,`delay`,`show`])}var c=t.t(o,[[`render`,s]]);exports.default=c;
//# sourceMappingURL=callbar-button.cjs.map