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