import { defineComponent as y, ref as g, computed as l, createElementBlock as a, openBlock as n, mergeProps as B, createCommentVNode as r, renderSlot as t, createBlock as i, unref as u } from "vue";
import d from "../components/PlIcon16/PlIcon16.vue.js";
import { useRipple as c } from "../composition/useRipple.js";
const z = { key: 0 }, k = {
  inheritAttrs: !1
}, h = /* @__PURE__ */ y({
  ...k,
  __name: "BtnBase",
  props: {
    loading: { type: Boolean },
    small: { type: Boolean },
    large: { type: Boolean },
    size: {},
    round: { type: Boolean },
    icon: {},
    reverse: { type: Boolean },
    justifyCenter: { type: Boolean }
  },
  setup(m) {
    const o = m, s = g(), p = l(() => o.small || o.size === "small"), f = l(() => o.large || o.size === "large");
    return c(s), (e, b) => (n(), a("button", B({
      ref_key: "btn",
      ref: s,
      tabindex: "0",
      class: { loading: e.loading, small: p.value, large: f.value, round: e.round, reverse: e.reverse, justifyCenter: e.justifyCenter, [e.$attrs.class + ""]: !0 }
    }, { ...e.$attrs, disabled: !!e.$attrs.disabled || e.loading }), [
      e.round ? r("", !0) : (n(), a("span", z, [
        t(e.$slots, "default")
      ])),
      t(e.$slots, "icon", {}, () => [
        e.loading ? (n(), i(u(d), {
          key: 0,
          name: "loading",
          size: e.size
        }, null, 8, ["size"])) : e.icon ? (n(), i(u(d), {
          key: 1,
          name: e.icon,
          size: e.size
        }, null, 8, ["name", "size"])) : r("", !0)
      ])
    ], 16));
  }
});
export {
  h as default
};
//# sourceMappingURL=BtnBase.vue.js.map
