import { defineComponent as g, defineAsyncComponent as i, ref as r, onMounted as _, nextTick as v, createElementBlock as w, openBlock as y, createElementVNode as e, createCommentVNode as c, createVNode as p, unref as u, withDirectives as h, withKeys as P, vModelText as k, toDisplayString as D } from "vue";
const N = { class: "flex w-screen-95 max-w-sm flex-col overflow-hidden rounded-lg border border-gray-400/75 bg-gray-200 text-gray-700 shadow-md" }, S = { class: "flex items-center gap-2 border-b border-gray-400/25 bg-gray-600 px-3 py-1 text-white" }, T = { class: "flex min-h-0 flex-auto flex-col gap-2 overflow-auto bg-white px-3 py-1" }, C = { class: "flex items-center gap-3 rounded-lg border border-amber-400 bg-amber-400/25 px-3 py-1" }, I = {
  for: "__PDF_PASSWORD_INPUT__",
  class: "mb-3 flex items-center justify-end gap-2"
}, V = { class: "relative flex items-center gap-2 rounded-lg border border-black/25 bg-white px-2 py-0.5 text-black focus-within:border-blue-700/75" }, A = { class: "absolute top-full text-center text-xs font-semibold text-rose-600" }, B = { class: "flex items-center justify-end gap-2 bg-white px-3 py-2" }, O = /* @__PURE__ */ g({
  __name: "index",
  props: {
    callback: { type: Function },
    reason: {}
  },
  emits: ["close"],
  setup(b, { emit: E }) {
    const f = i(() => import("./C3bDfqSq.js")), x = i(() => import("./DN-aONkm.js")), n = b, l = r(), o = r(), a = r(), d = () => {
      n.callback(o.value);
    };
    return _(() => {
      n.reason > 1 && (a.value = "Invalid Password!"), v(() => {
        var s;
        (s = l.value) == null || s.focus();
      });
    }), (s, t) => (y(), w("div", N, [
      e("div", S, [
        t[3] || (t[3] = e("div", { class: "flex-auto text-lg font-semibold" }, "Password", -1)),
        c("", !0)
      ]),
      e("div", T, [
        e("div", C, [
          p(u(f), {
            name: "warning",
            class: "aspect-square text-5xl text-amber-600"
          }),
          t[4] || (t[4] = e("div", { class: "font-semibold leading-tight" }, " The pdf file is protected. Please enter the document's password to continue. ", -1))
        ]),
        e("label", I, [
          t[5] || (t[5] = e("span", null, "Enter Password: ", -1)),
          e("div", V, [
            h(e("input", {
              id: "__PDF_PASSWORD_INPUT__",
              ref_key: "inpt",
              ref: l,
              "onUpdate:modelValue": t[1] || (t[1] = (m) => o.value = m),
              type: "password",
              class: "bg-transparent outline-none",
              onKeyup: P(d, ["enter"])
            }, null, 544), [
              [k, o.value]
            ]),
            e("div", A, D(a.value), 1)
          ])
        ])
      ]),
      e("div", B, [
        p(u(x), {
          label: "Ok",
          class: "w-24 rounded-lg border border-gray-400/75 bg-white px-3 py-1 font-bold text-gray-700 hover:border-blue-400",
          onClick: d
        }),
        c("", !0)
      ])
    ]));
  }
});
export {
  O as default
};
//# sourceMappingURL=Bzl7Ie67.js.map
