import { defineComponent as r, computed as m, createVNode as y } from "vue";
const p = {
  type: {
    type: String,
    default: "primary"
  },
  size: {
    type: String,
    default: "default"
  },
  disabled: {
    type: Boolean,
    default: !1
  },
  plain: {
    type: Boolean,
    default: !1
  },
  round: {
    type: Boolean,
    default: !1
  },
  circle: {
    type: Boolean,
    default: !1
  },
  autofocus: {
    type: Boolean,
    default: !1
  },
  nativeType: {
    type: String,
    default: "button"
  }
};
const d = "g";
function c(t, e, a) {
  let n = t;
  return e && (n += `__${e}`), a && (n += `--${a}`), n;
}
function b(t, e = !1) {
  const a = e ? `.${d}-${t}` : `${d}-${t}`;
  return {
    b: () => c(a),
    e: (o) => o ? c(a, o) : "",
    m: (o) => o ? c(a, "", o) : "",
    em: (o, f) => o && f ? c(a, o, f) : ""
  };
}
const B = "G", u = /* @__PURE__ */ r({
  name: `${B}Button`,
  props: p,
  emits: ["click"],
  setup(t, {
    slots: e,
    emit: a
  }) {
    const n = b("button"), l = m(() => ({
      [n.b()]: !0,
      [n.m(t.type)]: !!t.type,
      [n.m(`plain-${t.type}`)]: !!t.plain,
      [n.m(t.size)]: !!t.size,
      [n.m("round")]: t.round,
      [n.m("circle")]: t.circle
    })), i = (s) => {
      a("click", s);
    };
    return () => y("button", {
      class: l.value,
      type: t.nativeType,
      autofocus: t.autofocus,
      disabled: t.disabled,
      onClick: i
    }, [e.icon && e.icon(), e.default && e.default()]);
  }
});
u.install = function(t, e) {
  t.component(e || u.name, u);
};
const g = {
  title: "Button 按钮",
  category: "通用",
  status: "100%",
  install(t) {
    t.component(u.name, u);
  }
};
export {
  u as Button,
  g as default
};
