import { defineComponent as P, defineAsyncComponent as u, ref as S, computed as n, createElementBlock as g, openBlock as b, renderSlot as v, createElementVNode as l, createCommentVNode as x, createVNode as i, unref as r } from "vue";
const _ = { class: "relative flex items-center justify-center bg-foreground/5" }, j = { class: "flex-auto" }, z = { class: "px-2" }, M = { class: "flex flex-auto items-center justify-center divide-x divide-foreground/25 px-3 py-1 *:border-foreground/25 first:*:!border-l last:*:!border-r" }, $ = { class: "px-2" }, D = { class: "px-2" }, E = { class: "flex flex-auto items-center justify-end px-3" }, U = {
  key: 0,
  class: "realtive block h-[1em] w-[1em] animate-mltShdSpin overflow-hidden rounded-full -indent-[9999em] text-sm leading-none text-black",
  style: { transform: "translateZ(0)" }
}, A = /* @__PURE__ */ P({
  __name: "index",
  props: {
    page: { type: Number, default: 1 },
    pages: { type: Number, default: 0 },
    scale: { type: Number, default: 1 },
    rotation: {
      type: Number,
      default: 0,
      validator: (t) => t % 90 == 0
    },
    mode: {
      type: String,
      default: "vertical"
    },
    sidebar: { type: Boolean, default: !1 },
    loading: { type: Boolean, default: !1 },
    disabled: { type: Boolean, default: !1 }
  },
  emits: [
    "update:page",
    "update:mode",
    "update:scale",
    "update:sidebar",
    "update:rotation",
    "fitPage"
  ],
  setup(t, { expose: y, emit: k }) {
    const c = u(() => import("./DN-aONkm.js")), h = u(() => import("./B4x2hpbc.js")), N = u(() => import("./DpsDXEMR.js")), s = t, d = k, m = S(), p = n({
      get: () => s.scale,
      set: (e) => d("update:scale", e)
    }), V = n(() => {
      var e;
      return (e = m.value) == null ? void 0 : e.scales;
    }), f = n({
      get: () => s.page,
      set: (e) => d("update:page", e)
    });
    n({
      get: () => s.sidebar,
      set: (e) => d("update:sidebar", e)
    });
    const w = n({
      get: () => s.rotation,
      set: (e) => d("update:rotation", e)
    }), B = () => {
      d("update:mode", s.mode == "vertical" ? "horizontal" : "vertical");
    };
    y({
      scales: V
    });
    const C = (e) => {
      const a = (w.value + e) % 360, o = Math.max(-270, Math.min(270, a));
      d("update:rotation", o);
    };
    return (e, a) => (b(), g("div", _, [
      v(e.$slots, "prepend"),
      l("div", j, [
        l("div", z, [
          x("", !0)
        ])
      ]),
      l("div", M, [
        l("div", $, [
          i(r(c), {
            class: "group rounded-lg px-1 py-0.5 text-2xl",
            icon: t.mode == "vertical" ? "table_rows" : "view_column",
            disabled: t.disabled,
            onClick: B
          }, null, 8, ["icon", "disabled"])
        ]),
        i(r(h), {
          modelValue: f.value,
          "onUpdate:modelValue": a[1] || (a[1] = (o) => f.value = o),
          pages: t.pages,
          mode: t.mode,
          disabled: t.disabled
        }, null, 8, ["modelValue", "pages", "mode", "disabled"]),
        i(r(N), {
          ref_key: "zoomer",
          ref: m,
          scale: p.value,
          "onUpdate:scale": a[2] || (a[2] = (o) => p.value = o),
          disabled: t.disabled,
          onFitPage: a[3] || (a[3] = (o) => d("fitPage", o))
        }, null, 8, ["scale", "disabled"]),
        l("div", D, [
          i(r(c), {
            class: "group rounded-lg px-1 py-0.5 text-2xl",
            icon: "rotate_left",
            disabled: t.disabled,
            onClick: a[4] || (a[4] = (o) => C(-90))
          }, null, 8, ["disabled"])
        ])
      ]),
      l("div", E, [
        t.loading ? (b(), g("span", U)) : x("", !0)
      ]),
      v(e.$slots, "append")
    ]));
  }
});
export {
  A as default
};
//# sourceMappingURL=DOB1Whjj.js.map
