"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react-i18next"),a=require("lucide-react"),u=require("react-router-dom"),l=require("./index-CVOA4qIe.js");function m(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return s.default=e,Object.freeze(s)}const x=m(a);function b(e,s){let r=a.Box;if(e){const o=x;if(o[e])r=o[e];else{const n=e.toLowerCase(),c=Object.keys(o).find(i=>i.toLowerCase()===n);c&&(r=o[c])}}return t.jsx(r,{className:s})}function g({module:e,buildUrl:s}){const{t:r}=d.useTranslation("admin"),o=e.sections?.length??0;return t.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:t.jsxs(u.Link,{to:e.route?s(e.route):"#",className:"block p-6",children:[t.jsx("div",{className:"flex items-start justify-between mb-4",children:t.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:b(e.icon,"w-7 h-7 text-[var(--color-accent-500)]")})}),t.jsx("h3",{className:"text-lg font-semibold text-[var(--text-primary)] mb-2",children:e.label}),o>0&&t.jsxs("p",{className:"text-sm text-[var(--text-secondary)] mb-4",children:[o," ",o===1?r("modules.sectionCount_one","section"):r("modules.sectionCount_other","sections")]}),t.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:[r("modules.open","Ouvrir"),t.jsx(a.ArrowRight,{className:"w-4 h-4"})]})]})})}function p(){const{t:e}=d.useTranslation("admin"),{getCurrentApplication:s,isLoading:r}=l.useNavigation(),o=l.useTenantUrl(),n=s(),c=n?.modules??[];return r?t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsx("div",{className:"w-8 h-8 border-2 border-[var(--color-accent-500)] border-t-transparent rounded-full animate-spin"})}):t.jsx(l.PageTemplate,{title:n?.label??e("modules.title","Modules"),subtitle:e("modules.subtitle","Sélectionnez un module pour commencer"),icon:t.jsx(a.Layers,{className:"w-6 h-6"}),breadcrumbs:[{label:n?.label??e("modules.title","Modules")}],children:t.jsx("section",{children:c.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:c.map(i=>t.jsx(g,{module:i,buildUrl:o},i.id))}):t.jsxs("div",{className:"text-center py-12 bg-[var(--bg-card)] rounded-2xl border border-[var(--border-color)]",children:[t.jsx(a.Box,{className:"w-12 h-12 text-[var(--text-tertiary)] mx-auto mb-4"}),t.jsx("p",{className:"text-[var(--text-secondary)]",children:e("modules.noModules","Aucun module disponible")})]})})})}exports.ApplicationsGridPage=p;
//# sourceMappingURL=ApplicationsGridPage-r7-GQkpv.js.map
