import { defineComponent as g, defineAsyncComponent as v, ref as b, createElementBlock as s, openBlock as d, createCommentVNode as r, createVNode as l, unref as f, withCtx as h, createElementVNode as a, toDisplayString as k } from "vue";
const y = { class: "vpdf:relative vpdf:py-1 vpdf:pl-6 vpdf:leading-none vpdf:select-none" }, C = {
  key: 0,
  class: "vpdf:absolute vpdf:top-0.5 vpdf:left-0 vpdf:flex vpdf:aspect-square vpdf:w-6 vpdf:items-center vpdf:justify-center vpdf:leading-none"
}, _ = { class: "vpdf:pointer-events-none vpdf:flex vpdf:flex-auto vpdf:items-center vpdf:text-start vpdf:text-sm vpdf:leading-tight vpdf:break-all" }, w = {
  key: 1,
  class: "-ml-3 py-2"
}, x = { class: "vpdf:border-l vpdf:border-foreground-400/50" }, N = /* @__PURE__ */ g({
  __name: "bookmarkItem",
  props: {
    outline: {}
  },
  emits: ["changePage"],
  setup(P, { emit: u }) {
    const p = v(() => import("./CK-QBAkR.js")), c = v(() => import("./DbkdmMu0.js")), m = u, n = b(!1), i = (e, t = null) => {
      e && m("changePage", { page: e, offset: t });
    };
    return (e, t) => (d(), s("div", y, [
      e.outline.sub.length > 0 ? (d(), s("div", C, [
        l(f(p), {
          icon: "arrow_right",
          class: "vpdf:rounded-md vpdf:px-2 vpdf:py-1 vpdf:font-bold",
          iconClass: {
            "vpdf:w-4 vpdf:aspect-square vpdf:transition-transform": !0,
            "vpdf:rotate-90": n.value
          },
          onClick: t[0] || (t[0] = (o) => n.value = !n.value)
        }, null, 8, ["iconClass"])
      ])) : r("", !0),
      l(f(p), {
        focusDisabled: "",
        class: "vpdf:w-full vpdf:px-1 vpdf:hover:underline",
        onClick: t[1] || (t[1] = (o) => i(e.outline.page, { y: e.outline.offsetY, x: e.outline.offsetX }))
      }, {
        default: h(() => [
          a("div", _, k(e.outline.title), 1)
        ]),
        _: 1
      }),
      e.outline.sub.length > 0 && n.value ? (d(), s("div", w, [
        a("div", x, [
          l(f(c), {
            outline: e.outline.sub,
            onChangePage: t[2] || (t[2] = (o) => i(o.page, o.offset))
          }, null, 8, ["outline"])
        ])
      ])) : r("", !0)
    ]));
  }
});
export {
  N as default
};
