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