import { defineComponent as m, openBlock as n, createElementBlock as l, createElementVNode as s, unref as t, createCommentVNode as c, withDirectives as p, vModelDynamic as u } from "vue";
import { usePass as _ } from "./composables-5f691338.js";
const h = { class: "flex flex-col mt-4 bg-light-700 dark-bg-dark-400 p-4 m-2 shadow-lg rounded-xl" }, f = /* @__PURE__ */ s("div", { class: "flex items-center mb-4" }, [
  /* @__PURE__ */ s("div", { class: "mx-2" }, [
    /* @__PURE__ */ s("div", { class: "i-la-asterisk" })
  ]),
  /* @__PURE__ */ s("div", { class: "px-1" }, "Enter a passphrase to encrypt your key with")
], -1), v = { class: "flex items-center px-4" }, x = { class: "ml-1 flex flex-col items-center" }, k = {
  key: 0,
  class: "i-la-check text-green-600 m-1"
}, y = ["type", "placeholder"], g = /* @__PURE__ */ s("div", { class: "i-la-check" }, null, -1), w = /* @__PURE__ */ s("div", { class: "ml-2" }, "Set", -1), b = [
  g,
  w
], C = /* @__PURE__ */ s("div", { class: "i-la-eye" }, null, -1), E = /* @__PURE__ */ s("div", { class: "ml-2" }, "Show", -1), V = [
  C,
  E
], N = /* @__PURE__ */ m({
  __name: "AuthPass",
  setup($) {
    const { pass: e } = _();
    return (B, o) => {
      var a, d, r;
      return n(), l("div", h, [
        f,
        s("div", v, [
          s("div", x, [
            (a = t(e).safe) != null && a.enc ? (n(), l("div", k)) : c("", !0)
          ]),
          p(s("input", {
            class: "p-2 mx-4 rounded-xl w-full dark-bg-dark-200",
            "onUpdate:modelValue": o[0] || (o[0] = (i) => t(e).input = i),
            type: t(e).show ? "text" : "password",
            placeholder: `Your passphrase of ${t(e).minLength} or more letters`
          }, null, 8, y), [
            [u, t(e).input]
          ]),
          t(e).input.length >= t(e).minLength ? (n(), l("button", {
            key: 0,
            class: "button items-center",
            onClick: o[1] || (o[1] = (i) => t(e).set())
          }, b)) : c("", !0),
          (r = (d = t(e)) == null ? void 0 : d.safe) != null && r.enc ? (n(), l("button", {
            key: 1,
            class: "button items-center",
            onClick: o[2] || (o[2] = (i) => t(e).show = !t(e).show)
          }, V)) : c("", !0)
        ])
      ]);
    };
  }
});
export {
  N as default
};
//# sourceMappingURL=AuthPass-4a451e4b.js.map
