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

//# sourceMappingURL=BtnBase.vue2.js.map