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