"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv");require("../../config-provider/index.js");const p=require("./style/index.js"),m=require("../../config-provider/hooks/use-namespace.js"),h=require("../../config-provider/hooks/use-locale.js"),f={key:0,class:"selected-desc"},y={class:"selected-desc-conut"},S={class:"selected-desc-clean"},v=e.defineComponent({__name:"ApBatchAction",props:{selectedRowKeys:{},clearAll:{},showSelected:{type:Boolean,default:!0}},setup(l){const{b:n}=m.useNamespace("ap-batch-action"),{t:c}=h.useLocale(),r=p.default("ap-batch-action"),s=l,a=e.useSlots(),i=e.computed(()=>s.selectedRowKeys?.length||0),d=e.computed(()=>!!a.header?.()?.some(t=>t.type!==e.Comment&&(typeof t.children!="string"||t.children.trim()!=="")));return(o,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n)(),e.unref(r)])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(e.unref(n)("header"))},[e.renderSlot(o.$slots,"header")],2),[[e.vShow,d.value]]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n)("body"))},[e.renderSlot(o.$slots,"prefix"),s.showSelected?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",y,[e.createTextVNode(e.toDisplayString(e.unref(c)("ap.apBatchAction.selected"))+" ",1),e.createElementVNode("span",null,e.toDisplayString(i.value),1),e.createTextVNode(" "+e.toDisplayString(e.unref(c)("ap.apBatchAction.piecesOfData")),1)]),e.createElementVNode("div",S,[e.createVNode(e.unref(u.Button),{type:"link",onClick:t[0]||(t[0]=N=>s.clearAll&&s.clearAll())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("ap.apBatchAction.empty")),1)]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"suffix")],2)],2))}});exports.default=v;
