import { a3 as m, a4 as a, M as f, v as B, X as s, w as r, bY as S, V as c, ad as u, I as h, ab as C, a5 as d, gF as V, gG as v, aG as x, gH as $, aa as p, U as F, H as o, ae as l, af as i, ag as T, ah as E, aj as P, ai as k, ak as I, P as w, gI as H } from "./56c67d3b.js";
import "react";
import "react-dom";
const b = m(H)`
  ${(e) => e.$animationStyle}
`, O = m.div`
    width: 0px;
    height: 0px;
    overflow: hidden;
    .ant-float-btn-group {
        inset-block-end: 0px;
        right: -40px;
    }
    .ant-float-btn {
        right: 0px;
        inset-block-end: -8px;
    }
    .ant-float-btn-primary .ant-float-btn-body {
    background: ${(e) => e.$style.background};
    border: ${(e) => e.$style.border};
    border-style: ${(e) => e.$style.borderStyle};
    border-width: ${(e) => e.$style.borderWidth};
    }
`, q = [{
  label: a("floatButton.square"),
  value: "square"
}, {
  label: a("floatButton.circle"),
  value: "circle"
}], G = [{
  label: a("floatButton.primary"),
  value: "primary"
}, {
  label: a("floatButton.default"),
  value: "default"
}], M = new f({
  id: B(-1),
  label: s,
  badge: r(I, 0),
  description: r(s, ""),
  icon: r(w, "/icon:antd/questioncircleoutlined"),
  onEvent: S,
  hidden: c
}, (e) => e).setPropertyViewFn((e) => /* @__PURE__ */ u(h, {
  children: [e.label.propertyView({
    label: a("label")
  }), e.description.propertyView({
    label: a("floatButton.description")
  }), e.badge.propertyView({
    label: a("floatButton.badge")
  }), e.hidden.propertyView({
    label: a("floatButton.hidden")
  }), e.icon.propertyView({
    label: a("icon")
  }), e.onEvent.getPropertyView()]
})).build(), N = {
  value: C("value"),
  includeMargin: c.DEFAULT_TRUE,
  image: s,
  icon: r(w, "/icon:antd/questioncircleoutlined"),
  badgeStyle: d(V),
  style: d(v, "style"),
  animationStyle: d(x, "animationStyle"),
  buttons: $(M, {
    initOptions: [{
      id: 0,
      label: a("optionsControl.optionI", {
        i: "1"
      }),
      icon: "/icon:antd/filetextoutlined",
      badge: "1"
    }, {
      id: 1,
      label: a("optionsControl.optionI", {
        i: "2"
      }),
      icon: "/icon:antd/filetextoutlined"
    }],
    autoIncField: "id"
  }),
  shape: p(q, "circle"),
  buttonTheme: p(G, "primary"),
  dot: c
}, U = (e) => {
  const g = (t, n) => t != null && t.hidden ? "" : /* @__PURE__ */ o(b, {
    $animationStyle: e.animationStyle,
    icon: t == null ? void 0 : t.icon,
    onClick: () => t.onEvent("click"),
    tooltip: t == null ? void 0 : t.label,
    description: t == null ? void 0 : t.description,
    badge: {
      count: t == null ? void 0 : t.badge,
      color: e.badgeStyle.badgeColor,
      dot: e == null ? void 0 : e.dot
    },
    type: n ? e.buttonTheme : "default",
    shape: e.shape
  }, t == null ? void 0 : t.id);
  return /* @__PURE__ */ o(O, {
    $badgeStyle: e.badgeStyle,
    $style: e.style,
    children: e.buttons.length === 1 ? g(e.buttons[0], !0) : /* @__PURE__ */ o(b.Group, {
      trigger: "hover",
      icon: e.icon,
      shape: e.shape,
      badge: {
        count: e.buttons.reduce((t, n) => t + (n.buttonType === "custom" && !n.hidden ? n.badge : 0), 0),
        color: e.badgeStyle.badgeColor,
        dot: e.dot
      },
      type: e.buttonTheme,
      children: e.buttons.map((t) => g(t))
    })
  });
};
let y = function() {
  return new F(N, (e) => /* @__PURE__ */ o(U, {
    ...e
  })).setPropertyViewFn((e) => /* @__PURE__ */ u(h, {
    children: [/* @__PURE__ */ u(l, {
      name: i.basic,
      children: [e.buttons.propertyView({}), e.icon.propertyView({
        label: a("icon")
      }), e.shape.propertyView({
        label: a("floatButton.buttonShape"),
        radioButton: !0
      }), e.buttonTheme.propertyView({
        label: a("floatButton.buttonTheme"),
        radioButton: !0
      }), e.dot.propertyView({
        label: a("floatButton.dot")
      })]
    }), /* @__PURE__ */ o(l, {
      name: i.layout,
      children: T(e)
    }), /* @__PURE__ */ o(l, {
      name: i.badgeStyle,
      children: e.badgeStyle.getPropertyView()
    }), /* @__PURE__ */ o(l, {
      name: i.style,
      children: e.style.getPropertyView()
    }), /* @__PURE__ */ o(l, {
      name: i.animationStyle,
      hasTooltip: !0,
      children: e.animationStyle.getPropertyView()
    })]
  })).build();
}();
y = class extends y {
  autoHeight() {
    return !0;
  }
};
const R = E(y, [new P("value", a("QRCode.valueDesc")), k]);
export {
  R as FloatButtonComp
};
