(function(vue) {
  "use strict";
  const _hoisted_1 = ["href", "title", "target"];
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
    __name: "Heading",
    props: {
      options: {},
      element: {},
      api: {}
    },
    setup(__props) {
      return (_ctx, _cache) => {
        const _component_RenderValue = vue.resolveComponent("RenderValue");
        return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(__props.options.tag || "h1"), null, {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "start"),
            __props.options.link && __props.options.link.link ? (vue.openBlock(), vue.createElementBlock("a", {
              key: 0,
              href: __props.options.link.link,
              title: __props.options.link.title,
              target: __props.options.link.target,
              onClick: _cache[0] || (_cache[0] = vue.withModifiers(
                (e) => {
                  e.preventDefault();
                },
                ["prevent"]
              ))
            }, [
              vue.createVNode(_component_RenderValue, {
                option: "content",
                "forced-root-node": false
              })
            ], 8, _hoisted_1)) : (vue.openBlock(), vue.createBlock(_component_RenderValue, {
              key: 1,
              option: "content",
              "forced-root-node": false
            })),
            vue.renderSlot(_ctx.$slots, "end")
          ]),
          _: 3
          /* FORWARDED */
        });
      };
    }
  });
  window.zb.editor.registerElementComponent({
    elementType: "zion_heading",
    component: _sfc_main
  });
})(zb.vue);
