import{a as _}from"./chunk-YEESETR2.js";import{f as w,i as M}from"./chunk-ZEULGWAI.js";import"./chunk-MBEC6LK4.js";import{Eb as n,Fa as a,Fb as m,Gb as c,Oa as S,Ob as p,T as d,Ta as b,U as s,ca as u,db as x,fb as v,gb as y,hb as E,ib as C,jb as h,kb as e,lb as t,mb as l,sb as f,xc as k}from"./chunk-TVKQFRWX.js";import"./chunk-DAQOROHW.js";var H=()=>[1,2,3],D=()=>({action:"new"});function T(r,o){r&1&&(e(0,"div",4),l(1,"div",5)(2,"div",6)(3,"div",7),t())}function L(r,o){r&1&&(e(0,"div",3),E(1,T,4,0,"div",4,y),t()),r&2&&(a(),C(p(0,H)))}function I(r,o){if(r&1&&(e(0,"p",18),n(1),t()),r&2){let i=f(2);a(),c("",i.stats().pendingContacts," en attente")}}function j(r,o){if(r&1&&(e(0,"div",3)(1,"div",8)(2,"div",9),d(),e(3,"svg",10),l(4,"path",11),t()(),s(),e(5,"div",12)(6,"p",1),n(7),t(),e(8,"p",13),n(9,"Articles"),t(),e(10,"p",14),n(11),t()()(),e(12,"div",8)(13,"div",15),d(),e(14,"svg",16),l(15,"path",17),t()(),s(),e(16,"div",12)(17,"p",1),n(18),t(),e(19,"p",13),n(20,"Documents"),t(),e(21,"p",18),n(22),t()()(),e(23,"div",8)(24,"div",9),d(),e(25,"svg",10),l(26,"path",19),t()(),s(),e(27,"div",12)(28,"p",1),n(29),t(),e(30,"p",13),n(31,"Messages"),t(),x(32,I,2,1,"p",18),t()()(),e(33,"div",20)(34,"div",21)(35,"h3",22),n(36,"Utilisateurs"),t(),e(37,"div",23)(38,"div",24),d(),e(39,"svg",25),l(40,"path",26),t()(),s(),e(41,"div",12)(42,"p",27),n(43),t(),e(44,"p",2),n(45,"Utilisateurs enregistr\xE9s"),t(),e(46,"p",28),n(47),t()()()()(),e(48,"div",29)(49,"h3",22),n(50,"Actions rapides"),t(),e(51,"div",30)(52,"a",31),d(),e(53,"svg",32),l(54,"path",33),t(),s(),e(55,"p",34),n(56,"Nouvel article"),t()(),e(57,"a",35),d(),e(58,"svg",36),l(59,"path",37),t(),s(),e(60,"p",38),n(61,"Ajouter document"),t()(),e(62,"a",39),d(),e(63,"svg",40),l(64,"path",19),t(),s(),e(65,"p",41),n(66,"Voir messages"),t()()()()),r&2){let i=f();a(7),m(i.stats().totalArticles),a(4),c("",i.stats().publishedArticles," publi\xE9s"),a(7),m(i.stats().totalDocuments),a(4),c("",i.stats().publicDocuments," publics"),a(7),m(i.stats().totalContacts),a(3),v(i.stats().pendingContacts>0?32:-1),a(11),m(i.stats().totalUsers),a(4),c("",i.stats().activeUsers," actifs"),a(5),h("queryParams",p(10,D)),a(5),h("queryParams",p(11,D))}}var V=class r{constructor(o){this.apiService=o}stats=u(null);loading=u(!0);ngOnInit(){this.loadStats()}loadStats(){this.apiService.getDashboardStats().subscribe({next:o=>{o.success&&this.stats.set(o.data),this.loading.set(!1)},error:()=>this.loading.set(!1)})}static \u0275fac=function(i){return new(i||r)(S(_))};static \u0275cmp=b({type:r,selectors:[["app-dashbord"]],decls:8,vars:1,consts:[[1,"space-y-6"],[1,"text-2xl","font-bold","text-neutral-900"],[1,"text-neutral-500"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-3","gap-6"],[1,"card","animate-pulse","p-6","rounded-xl","shadow"],[1,"h-12","w-12","bg-neutral-200","rounded-full","mb-4"],[1,"h-6","bg-neutral-200","rounded","w-1/2","mb-2"],[1,"h-4","bg-neutral-200","rounded","w-3/4"],[1,"card","p-6","rounded-xl","shadow","flex","items-center","gap-4"],[1,"bg-primary-100","p-3","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-6","h-6","text-primary-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"],[1,"flex-1"],[1,"text-sm","text-neutral-500"],[1,"text-xs","text-primary-600"],[1,"bg-secondary-100","p-3","rounded-full","flex","items-center","justify-center"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-6","h-6","text-secondary-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"],[1,"text-xs","text-secondary-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"],[1,"mt-6"],[1,"card","p-6","rounded-xl","shadow"],[1,"text-lg","font-semibold","text-neutral-900","mb-4"],[1,"flex","items-center","gap-4"],[1,"stat-icon-primary","w-16","h-16","flex","items-center","justify-center","rounded-full","bg-primary-100"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-8","h-8","text-primary-600"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"],[1,"text-3xl","font-bold","text-neutral-900"],[1,"text-sm","text-primary-600"],[1,"card","p-6","rounded-xl","shadow","mt-6"],[1,"grid","grid-cols-1","sm:grid-cols-3","gap-4"],["routerLink","/admin/articles",1,"p-4","bg-primary-50","rounded-xl","text-center","hover:bg-primary-100","transition-colors",3,"queryParams"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-8","h-8","text-primary-600","mx-auto","mb-2"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 6v6m0 0v6m0-6h6m-6 0H6"],[1,"text-sm","font-medium","text-primary-700"],["routerLink","/admin/documents",1,"p-4","bg-secondary-50","rounded-xl","text-center","hover:bg-secondary-100","transition-colors",3,"queryParams"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-8","h-8","text-secondary-600","mx-auto","mb-2"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"],[1,"text-sm","font-medium","text-secondary-700"],["routerLink","/admin/contacts",1,"p-4","bg-neutral-100","rounded-xl","text-center","hover:bg-neutral-200","transition-colors"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-8","h-8","text-neutral-600","mx-auto","mb-2"],[1,"text-sm","font-medium","text-neutral-700"]],template:function(i,g){i&1&&(e(0,"div",0)(1,"div")(2,"h1",1),n(3,"Tableau de bord"),t(),e(4,"p",2),n(5,"Vue d'ensemble de l'activit\xE9 du portail"),t()(),x(6,L,3,1,"div",3)(7,j,67,12),t()),i&2&&(a(6),v(g.loading()?6:g.stats()?7:-1))},dependencies:[k,M,w],encapsulation:2})};export{V as DashbordComponent};