import { defineComponent as r, createElementBlock as s, createCommentVNode as d, openBlock as p, createVNode as o, unref as n, withCtx as c, createElementVNode as u } from "vue";
import { V as f, p as T, l, q as A, r as m, s as b, a as k, t as v } from "./index-CVEvAPNs.js";
import { u as V } from "./index-BFe8XjpO.js";
import { _ as x } from "./_image-formatter.vue_vue_type_script_setup_true_lang-C4aTg0C6.js";
const C = { key: 0 }, N = /* @__PURE__ */ r({
  __name: "image-text",
  props: {
    content: {},
    disabled: { type: Boolean }
  },
  setup(g) {
    V(g.content, "imageText", { image: new k(), richtext: "", imageAlign: "left" });
    const a = A(v, { fontSize: ".75em" });
    return (e, t) => e.content.imageText ? (p(), s("div", C, [
      o(n(x), {
        round: "",
        modelValue: e.content.imageText.image,
        "onUpdate:modelValue": t[2] || (t[2] = (i) => e.content.imageText.image = i),
        icon: n(f),
        disabled: e.disabled,
        float: e.content.imageText.imageAlign
      }, {
        default: c(() => [
          t[4] || (t[4] = u("hr", null, null, -1)),
          o(n(T), { primary: "Anordnung des Bildes" }),
          o(n(l), {
            "keep-open": "",
            "leading-icon": e.content.imageText.imageAlign === "left" ? n(a) : n(m),
            active: e.content.imageText.imageAlign === "left",
            label: "Links",
            onClick: t[0] || (t[0] = (i) => e.content.imageText.imageAlign = "left")
          }, null, 8, ["leading-icon", "active"]),
          o(n(l), {
            "keep-open": "",
            "leading-icon": e.content.imageText.imageAlign === "right" ? n(a) : n(m),
            active: e.content.imageText.imageAlign === "right",
            label: "Rechts",
            onClick: t[1] || (t[1] = (i) => e.content.imageText.imageAlign = "right")
          }, null, 8, ["leading-icon", "active"])
        ]),
        _: 1,
        __: [4]
      }, 8, ["modelValue", "icon", "disabled", "float"]),
      o(n(b), {
        ref: "editor",
        style: { "--min-height": "150px" },
        disabled: e.disabled,
        content: e.content.imageText.richtext,
        onJson: t[3] || (t[3] = (i) => e.content.imageText.richtext = i)
      }, null, 8, ["disabled", "content"])
    ])) : d("", !0);
  }
});
export {
  N as default
};
