import { jsxs as a, jsx as e } from "react/jsx-runtime";
import { useState as d, useEffect as m } from "react";
import { useTranslation as v } from "react-i18next";
import { Construction as b, X as p, Mail as x, Calendar as h } from "lucide-react";
import { k as u } from "./index-Dh9kUeDn.js";
function k() {
  const { t } = v(["navigation", "common"]), { user: r } = u(), [i, o] = d(null);
  m(() => {
    if (i) {
      const s = setTimeout(() => o(null), 4e3);
      return () => clearTimeout(s);
    }
  }, [i]);
  const n = () => {
    o(t("common:underDevelopment.description"));
  }, l = r?.firstName && r?.lastName ? `${r.firstName} ${r.lastName}` : r?.email || t("common:name"), c = r?.firstName && r?.lastName ? `${r.firstName.at(0)}${r.lastName.at(0)}`.toUpperCase() : r?.email?.at(0)?.toUpperCase() || "U";
  return /* @__PURE__ */ a("div", { className: "space-y-6", children: [
    /* @__PURE__ */ a("div", { children: [
      /* @__PURE__ */ e("h1", { className: "text-2xl font-bold text-[var(--text-primary)]", children: t("navigation:sidebar.profile") }),
      /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)] mt-1", children: t("navigation:profile.subtitle") })
    ] }),
    i && /* @__PURE__ */ a(
      "div",
      {
        className: "flex items-center gap-3 p-4 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 text-amber-800 dark:text-amber-200",
        style: { borderRadius: "var(--radius-card)" },
        children: [
          /* @__PURE__ */ e(b, { className: "w-5 h-5 flex-shrink-0" }),
          /* @__PURE__ */ e("span", { className: "flex-1 text-sm", children: i }),
          /* @__PURE__ */ e(
            "button",
            {
              onClick: () => o(null),
              className: "p-1 hover:bg-amber-100 dark:hover:bg-amber-800/30 rounded transition-colors",
              children: /* @__PURE__ */ e(p, { className: "w-4 h-4" })
            }
          )
        ]
      }
    ),
    /* @__PURE__ */ a(
      "div",
      {
        className: "bg-[var(--bg-card)] border border-[var(--border-color)] p-6",
        style: { borderRadius: "var(--radius-card)" },
        children: [
          /* @__PURE__ */ a("div", { className: "flex items-center gap-6 mb-6", children: [
            /* @__PURE__ */ e(
              "div",
              {
                className: "w-20 h-20 bg-gradient-to-br from-[var(--color-accent-500)] to-[var(--color-accent-600)] flex items-center justify-center text-white text-2xl font-bold",
                style: { borderRadius: "var(--radius-card)" },
                children: c
              }
            ),
            /* @__PURE__ */ a("div", { children: [
              /* @__PURE__ */ e("h2", { className: "text-xl font-semibold text-[var(--text-primary)]", children: l }),
              /* @__PURE__ */ e("p", { className: "text-[var(--text-secondary)]", children: r?.email }),
              r?.roles && r.roles.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-2 mt-2", children: r.roles.map((s) => /* @__PURE__ */ e(
                "span",
                {
                  className: "px-2 py-1 text-xs font-medium bg-[var(--accent-bg)] text-[var(--color-accent-600)]",
                  style: { borderRadius: "var(--radius-badge)" },
                  children: s
                },
                s
              )) })
            ] })
          ] }),
          /* @__PURE__ */ a("div", { className: "space-y-4", children: [
            /* @__PURE__ */ a("div", { className: "flex items-center gap-3 text-[var(--text-secondary)]", children: [
              /* @__PURE__ */ e(x, { className: "w-5 h-5" }),
              /* @__PURE__ */ e("span", { children: r?.email || t("navigation:profile.notProvided") })
            ] }),
            /* @__PURE__ */ a("div", { className: "flex items-center gap-3 text-[var(--text-secondary)]", children: [
              /* @__PURE__ */ e(h, { className: "w-5 h-5" }),
              /* @__PURE__ */ e("span", { children: t("navigation:profile.memberSince", { date: "janvier 2024" }) })
            ] })
          ] }),
          /* @__PURE__ */ e("div", { className: "mt-6 pt-6 border-t border-[var(--border-color)]", children: /* @__PURE__ */ e(
            "button",
            {
              onClick: n,
              className: "px-4 py-2 bg-[var(--color-accent-500)] hover:bg-[var(--color-accent-600)] text-white font-medium transition-colors",
              style: { borderRadius: "var(--radius-button)" },
              children: t("common:buttons.edit")
            }
          ) })
        ]
      }
    ),
    /* @__PURE__ */ a(
      "div",
      {
        className: "bg-[var(--bg-card)] border border-[var(--border-color)] p-6",
        style: { borderRadius: "var(--radius-card)" },
        children: [
          /* @__PURE__ */ e("h3", { className: "text-lg font-semibold text-[var(--text-primary)] mb-4", children: t("navigation:profile.security.title") }),
          /* @__PURE__ */ a("div", { className: "space-y-4", children: [
            /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
              /* @__PURE__ */ a("div", { children: [
                /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: t("navigation:profile.security.password") }),
                /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: t("navigation:profile.security.lastChanged", { days: 30 }) })
              ] }),
              /* @__PURE__ */ e(
                "button",
                {
                  onClick: n,
                  className: "px-3 py-1.5 text-sm bg-[var(--bg-tertiary)] hover:bg-[var(--bg-hover)] text-[var(--text-primary)] transition-colors",
                  style: { borderRadius: "var(--radius-button)" },
                  children: t("common:buttons.edit")
                }
              )
            ] }),
            /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
              /* @__PURE__ */ a("div", { children: [
                /* @__PURE__ */ e("p", { className: "font-medium text-[var(--text-primary)]", children: t("navigation:profile.security.twoFactor") }),
                /* @__PURE__ */ e("p", { className: "text-sm text-[var(--text-secondary)]", children: t("navigation:profile.security.notEnabled") })
              ] }),
              /* @__PURE__ */ e(
                "button",
                {
                  onClick: n,
                  className: "px-3 py-1.5 text-sm bg-[var(--bg-tertiary)] hover:bg-[var(--bg-hover)] text-[var(--text-primary)] transition-colors",
                  style: { borderRadius: "var(--radius-button)" },
                  children: t("navigation:profile.security.enable")
                }
              )
            ] })
          ] })
        ]
      }
    )
  ] });
}
export {
  k as ProfilePage
};
//# sourceMappingURL=ProfilePage-DdlezXRX.js.map
