import { defineComponent as m, useSlots as d, openBlock as u, createBlock as P, unref as n, mergeProps as _, withCtx as t, createVNode as y, normalizeProps as i, guardReactiveProps as p, createSlots as C, renderList as B, renderSlot as x } from "vue";
import { Popconfirm as A } from "@aplus-frontend/antdv";
import { omit as a } from "lodash-unified";
import "../item/index.vue.mjs";
import b from "../item/index.vue2.mjs";
const I = /* @__PURE__ */ m({
  name: "ApActionItemPopconfirm",
  __name: "index",
  props: {
    text: {},
    color: { default: "primary" },
    disabled: { type: Boolean, default: !1 },
    visible: { type: Boolean, default: !0 },
    onAction: {},
    onClick: {},
    loading: { type: Boolean, default: !1 },
    icon: {},
    iconFirst: { type: Boolean },
    tooltip: {},
    popconfirmProps: { default: () => ({}) }
  },
  setup(s) {
    const l = d(), o = s;
    async function c(e) {
      o.popconfirmProps.onConfirm?.(e), await o.onAction?.(e);
    }
    return (e, g) => (u(), P(n(A), _(n(a)(o.popconfirmProps, ["onConfirm"]), {
      disabled: !o.popconfirmProps,
      "overlay-style": { zIndex: 1060 },
      onConfirm: c
    }), {
      default: t(() => [
        y(b, i(p(n(a)(o, ["popconfirmProps", "onAction"]))), C({ _: 2 }, [
          B(l, (h, r) => ({
            name: r,
            fn: t((f) => [
              x(e.$slots, r, i(p(f || {})))
            ])
          }))
        ]), 1040)
      ]),
      _: 3
    }, 16, ["disabled"]));
  }
});
export {
  I as default
};
