import { defineComponent as a, useSlots as m, openBlock as f, createBlock as u, mergeProps as d, unref as y, createSlots as k, renderList as B, withCtx as b, renderSlot as P, normalizeProps as g, guardReactiveProps as C } from "vue";
import { omit as i } from "lodash-unified";
import "./ap-button.vue2.mjs";
import { confirmHandle as _ } from "./utils/index.mjs";
import h from "./ap-button.vue.mjs";
const z = /* @__PURE__ */ a({
  __name: "ap-confirm-button",
  props: {
    prefixCls: {},
    htmlType: {},
    shape: {},
    size: {},
    loading: { type: [Boolean, Object] },
    disabled: { type: Boolean },
    ghost: { type: Boolean },
    block: { type: Boolean },
    danger: { type: Boolean },
    icon: {},
    href: {},
    target: {},
    title: { type: [String, Function, Object, Number, Boolean, null, Array] },
    onMousedown: {},
    autoInsertSpace: { type: Boolean },
    iconPosition: {},
    color: {},
    variant: {},
    type: {},
    borderLinkColor: {},
    minWidth: { type: [Boolean, Number, String] },
    lazy: { type: [Boolean, Number] },
    onClick: {},
    content: { type: [String, Function, Object, Number, Boolean, null, Array] },
    confirmProps: { default: () => ({}) }
  },
  setup(c) {
    const o = c, l = m(), s = () => {
      const t = o.confirmProps?.onOk || o.onClick, n = o.confirmProps?.title || o.title, r = o.confirmProps?.content || o.content, e = {
        centered: !0,
        // 默认居中
        onOk: t,
        title: n,
        content: r,
        ...i(o.confirmProps, ["onOk", "title", "content"])
      };
      _(e);
    };
    return (t, n) => (f(), u(h, d(y(i)(o, ["confirmProps", "onClick"]), { onClick: s }), k({ _: 2 }, [
      B(l, (r, e) => ({
        name: e,
        fn: b((p) => [
          P(t.$slots, e, g(C(p || {})))
        ])
      }))
    ]), 1040));
  }
});
export {
  z as default
};
