"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("@aplus-frontend/antdv"),u=require("lodash-unified");require("../../config-provider/index.js");require("../../ap-button/ap-action-button.vue2.js");require("../../ap-button/ap-button.vue2.js");require("../ap-batch-action-group/ApBatchActionGroup.vue.js");require("../ap-export-group/ApExportGroup.vue.js");const f=require("../../config-provider/hooks/use-global-config.js"),d=require("../../ap-button/ap-button.vue.js"),v=require("../../ap-button/ap-action-button.vue.js"),k=require("../ap-batch-action-group/ApBatchActionGroup.vue2.js"),y=require("../ap-export-group/ApExportGroup.vue2.js"),B=e.defineComponent({__name:"ApButtonGroup",props:{spaceProps:{},selectedRows:{},selectedRowKeys:{},groupList:{}},setup(c){const l=f.useGlobalConfig("apExportGroup"),a=e.computed(()=>l.value?.hasPermission),o=c,s=e.computed(()=>o.groupList);function p(r){let n=r?.ifShow;return!r?.ifShow&&r?.auth&&(n=()=>a.value?.(r.auth)),n?.()??!0}return(r,n)=>(e.openBlock(),e.createBlock(e.unref(_.Space),e.normalizeProps(e.guardReactiveProps(o.spaceProps??{})),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(t,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[t.valueType==="button"&&p(t)?(e.openBlock(),e.createBlock(d.default,e.mergeProps({key:0,ref_for:!0},{...e.unref(u.omit)(t,["valueType","ifShow","auth"])}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[t?.content]))))]),_:2},1040)):t.valueType==="actionButton"&&p(t)?(e.openBlock(),e.createBlock(v.default,e.mergeProps({key:1,ref_for:!0},{...e.unref(u.omit)(t,["valueType","ifShow","auth"])}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.h(e.Fragment,[t?.content]))))]),_:2},1040)):t.valueType==="batchActionGroup"?(e.openBlock(),e.createBlock(k.default,e.mergeProps({key:2,ref_for:!0},{...e.unref(u.omit)(t,["valueType"]),selectedRows:o?.selectedRows}),null,16)):t.valueType==="exportGroup"?(e.openBlock(),e.createBlock(y.default,e.mergeProps({key:3,ref_for:!0},{...e.unref(u.omit)(t,["valueType"]),selectedRowKeys:o?.selectedRowKeys}),null,16)):e.createCommentVNode("",!0)],64))),128))]),_:1},16))}});exports.default=B;
