import { _ as K } from "./genome-Logo-white-ffcf2413.mjs";
import { c as U } from "./PopupComponent-daa7c72d.mjs";
import { d as P, u as j, r as d, g as w, l as B, o as A, c as n, a as t, b as i, f, i as u, t as c, j as V, _ as C } from "./main-d713f3d7.mjs";
import { u as O } from "./index-be6397c8.mjs";
const I = "data:image/png;base64, ", L = { class: "genpact-blue-box fixed z-50 w-full" }, W = { class: "-bg-white geLight headerNav" }, Z = { class: "containerStart mx-auto px-6" }, z = { class: "flex h-14 items-center justify-between" }, E = { class: "flex flex-1 items-center justify-between" }, G = {
  key: 0,
  class: "-text-blue absolute z-50 w-1/2 border border-gray-300 bg-white p-2 text-xs"
}, J = { class: "flex items-center" }, M = { class: "relative p-4" }, Y = ["src"], _ = {
  key: 2,
  class: "shadow-xl text-md absolute -right-1 top-[60px] mx-5 flex w-80 flex-col border border-gray-300 bg-white px-1 text-left text-genpact-darkest-blue"
}, $ = { class: "flex items-center p-2" }, ee = ["src"], te = { class: "mt-2 px-2" }, Ae = { class: "font-bold" }, oe = {
  key: 0,
  class: "text-sm"
}, se = {
  key: 0,
  class: "text-xs"
}, ne = {
  key: 1,
  class: "text-xs"
}, ae = {
  key: 1,
  class: "text-sm"
}, le = { class: "text-sm" }, re = { class: "text-xs" }, de = /* @__PURE__ */ P({
  __name: "Header",
  props: {
    roleselection: {
      type: Object,
      default: () => ({})
    }
  },
  setup(p) {
    const l = j();
    O();
    const b = d(!1), m = d(""), a = d(!1), g = d(!1);
    d([]);
    const x = d(!1), y = (r) => {
      const e = document.querySelector(".header-locked");
      e && !e.contains(r.target.parentNode) && (a.value = !1);
    };
    return w(async () => {
      var v;
      document.addEventListener("click", y);
      let r = (v = l.userName) == null ? void 0 : v.split(",").map((o) => o.trim());
      console.log("userHashImage : ", l.userHashImage);
      let e = "";
      if (r.length > 1)
        e = r.map((o) => o[0]).join("");
      else {
        let o = r[0].split(" ");
        o.length > 1 ? e = o[0][0] + o[o.length - 1][0] : e = o[0].slice(0, 2);
      }
      console.log("initname", e), m.value = e.toUpperCase();
    }), B(() => {
      document.removeEventListener("click", y);
    }), (r, e) => {
      var v, o, q, T, k, H, R, h, N, Q, F, S, X, D;
      return A(), n("section", L, [
        t("nav", W, [
          t("div", Z, [
            t("div", z, [
              t("div", E, [
                t("div", null, [
                  t("img", {
                    onMouseenter: e[0] || (e[0] = (s) => b.value = !0),
                    onMouseleave: e[1] || (e[1] = (s) => b.value = !1),
                    class: "h-8 w-auto cursor-pointer",
                    src: I,
                    alt: "Genome Logo"
                  }, null, 32),
                  b.value ? (A(), n("div", G, e[9] || (e[9] = [
                    t("span", { class: "text-sm" }, [
                      i(" Meet "),
                      t("b", null, "AI Guru"),
                      i(", your AI-powered personal learning companion in Genome. ")
                    ], -1),
                    t("p", { class: "mt-2 text-sm" }, [
                      i(" AI Guru brings you "),
                      t("b", null, "personalized"),
                      i(" learning plans, skills profile, learning performance and more."),
                      t("br"),
                      i(" That’s not it, you can "),
                      t("b", null, "ask"),
                      i(" AI Guru real-time questions about skills you want to build to advance in your career! ")
                    ], -1)
                  ]))) : f("", !0)
                ]),
                e[11] || (e[11] = t("div", { class: "ml-6" }, [
                  t("div", { class: "flex space-x-4" }, [
                    t("a", { class: "px-4 py-2 font-medium text-white" })
                  ])
                ], -1)),
                t("div", J, [
                  e[10] || (e[10] = t("img", {
                    class: "mr-3 h-4 w-auto",
                    src: K,
                    alt: "Genome Logo"
                  }, null, -1)),
                  t("div", M, [
                    u(l).userHashImage && u(l).userHashImage.content ? (A(), n("div", {
                      key: 0,
                      onClick: e[2] || (e[2] = (s) => a.value = !a.value),
                      class: "h-7 header-locked w-7 cursor-pointer overflow-hidden rounded-full bg-gray-100 dark:bg-gray-600"
                    }, [
                      t("img", {
                        src: "data:image/png;base64," + u(l).userHashImage.content,
                        class: "h-7 w-7 rounded-full"
                      }, null, 8, Y)
                    ])) : (A(), n("div", {
                      key: 1,
                      onClick: e[3] || (e[3] = (s) => a.value = !a.value),
                      class: "h-7 header-locked w-7 cursor-pointer overflow-hidden rounded-full bg-gray-100 px-1 py-0.5 dark:bg-gray-600"
                    }, [
                      t("b", null, c(m.value), 1)
                    ])),
                    a.value ? (A(), n("div", _, [
                      t("div", $, [
                        u(l).userHashImage && u(l).userHashImage.content ? (A(), n("div", {
                          key: 0,
                          onClick: e[4] || (e[4] = (s) => a.value = !a.value),
                          class: "h-10 header-locked w-10 cursor-pointer overflow-hidden rounded-full bg-gray-100 dark:bg-gray-600"
                        }, [
                          t("img", {
                            src: "data:image/png;base64," + u(l).userHashImage.content,
                            class: "h-10 w-10 rounded-full"
                          }, null, 8, ee)
                        ])) : (A(), n("div", {
                          key: 1,
                          onClick: e[5] || (e[5] = (s) => a.value = !a.value),
                          class: "h-7 header-locked w-7 cursor-pointer overflow-hidden rounded-full bg-gray-100 px-1 py-0.5 dark:bg-gray-600"
                        }, [
                          t("b", null, c(m.value), 1)
                        ])),
                        t("div", te, [
                          t("div", Ae, c((o = (v = p.roleselection) == null ? void 0 : v.roleSelectionInfo) == null ? void 0 : o.emp_name), 1),
                          (k = (T = (q = p.roleselection) == null ? void 0 : q.roleSelectionInfo) == null ? void 0 : T.existingDelphiJourney) != null && k.pending_role_confirmation_flag ? (A(), n("div", ae, "Information awaited from business HR")) : (A(), n("div", oe, [
                            ((h = (R = (H = p.roleselection) == null ? void 0 : H.roleSelectionInfo) == null ? void 0 : R.existingDelphiJourney) == null ? void 0 : h.genome_role) !== "Do Not Select this Role" ? (A(), n("span", se, c((F = (Q = (N = p.roleselection) == null ? void 0 : N.roleSelectionInfo) == null ? void 0 : Q.existingDelphiJourney) == null ? void 0 : F.genome_role), 1)) : (A(), n("span", ne, "Information awaited from business HR"))
                          ])),
                          t("div", le, [
                            t("span", re, c((D = (X = (S = p.roleselection) == null ? void 0 : S.roleSelectionInfo) == null ? void 0 : X.existingDelphiJourney) == null ? void 0 : D.genome_function), 1)
                          ])
                        ])
                      ])
                    ])) : f("", !0)
                  ])
                ])
              ])
            ])
          ])
        ]),
        x.value ? (A(), V(U, {
          key: 0,
          name: "notification",
          onConsetvalueemit: e[6] || (e[6] = (s) => x.value = s)
        })) : f("", !0),
        g.value ? (A(), V(U, {
          key: 1,
          name: "coreskills",
          onCoreskillemit: e[7] || (e[7] = (s) => g.value = s),
          onConsetvalueemit: e[8] || (e[8] = (s) => g.value = s)
        })) : f("", !0)
      ]);
    };
  }
});
const ce = /* @__PURE__ */ C(de, [["__scopeId", "data-v-40f0739a"]]);
export {
  ce as D
};
