"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react-i18next"),c=require("lucide-react"),u=require("react-router-dom"),a=require("./index-2wUhd9Lu.js");function m(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const x=m(c);function b(t){if(!t)return c.Box;const r=x;if(r[t])return r[t];const o=t.toLowerCase(),s=Object.keys(r).find(n=>n.toLowerCase()===o);return s?r[s]:c.Box}function v({module:t,buildUrl:r}){const{t:o}=d.useTranslation("admin"),s=b(t.icon),n=t.sections?.length??0;return e.jsx("div",{className:"group relative bg-[var(--bg-card)] rounded-2xl border border-[var(--border-color)] overflow-hidden hover:border-[var(--color-accent-500)]/50 transition-all duration-300 hover:shadow-lg hover:shadow-[var(--color-accent-500)]/10",children:e.jsxs(u.Link,{to:t.route?r(t.route):"#",className:"block p-6",children:[e.jsx("div",{className:"flex items-start justify-between mb-4",children:e.jsx("div",{className:"w-14 h-14 rounded-xl bg-gradient-to-br from-[var(--color-accent-500)]/20 to-[var(--color-accent-600)]/20 flex items-center justify-center group-hover:from-[var(--color-accent-500)]/30 group-hover:to-[var(--color-accent-600)]/30 transition-all",children:e.jsx(s,{className:"w-7 h-7 text-[var(--color-accent-500)]"})})}),e.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)] mb-2",children:t.label}),n>0&&e.jsxs("p",{className:"text-sm text-[var(--text-secondary)] mb-4",children:[n," ",n===1?o("modules.sectionCount_one","section"):o("modules.sectionCount_other","sections")]}),e.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-accent-500)] text-sm font-medium opacity-0 group-hover:opacity-100 transition-opacity",children:[o("modules.open","Ouvrir"),e.jsx(c.ArrowRight,{className:"w-4 h-4"})]})]})})}function p(){const{t}=d.useTranslation("admin"),{getCurrentApplication:r,isLoading:o}=a.useNavigation(),s=a.useTenantUrl(),n=r(),i=n?.modules??[];return o?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx("div",{className:"w-8 h-8 border-2 border-[var(--color-accent-500)] border-t-transparent rounded-full animate-spin"})}):e.jsxs("div",{className:"space-y-8",children:[e.jsx(a.Breadcrumb,{items:[{label:n?.label??t("modules.title","Modules")}]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-[var(--text-primary)]",children:n?.label??t("modules.title","Modules")}),e.jsx("p",{className:"text-[var(--text-secondary)] mt-1",children:t("modules.subtitle","Sélectionnez un module pour commencer")})]}),e.jsx("section",{children:i.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:i.map(l=>e.jsx(v,{module:l,buildUrl:s},l.id))}):e.jsxs("div",{className:"text-center py-12 bg-[var(--bg-card)] rounded-2xl border border-[var(--border-color)]",children:[e.jsx(c.Box,{className:"w-12 h-12 text-[var(--text-tertiary)] mx-auto mb-4"}),e.jsx("p",{className:"text-[var(--text-secondary)]",children:t("modules.noModules","Aucun module disponible")})]})})]})}exports.ApplicationsGridPage=p;
//# sourceMappingURL=ApplicationsGridPage-BQaMsK1K.js.map
