import{u as j,f as g,j as e,h as t,d as n,i as f,k,l as w,m as u,n as N,S as v,A as c,o as y,T as I,D as R,p as $,q as S,s as C,v as T,E as z}from"./index-B-sDl1ER.js";import{B as i}from"./index-CFsVFAkS.js";import{C as o}from"./index-CO5DzGxy.js";import{L as l}from"./index-S1dQ7QE3.js";import{T as m}from"./index-C9m5qSM4.js";import"./index-DmtjhyJb.js";const{Meta:A}=o,{Text:D,Title:L}=I,q=()=>{const{t:s}=j(),r=g(a=>a.userinfo);if(!r)return e.jsx(e.Fragment,{});const p=[{key:"projects",label:e.jsxs(e.Fragment,{children:[e.jsx(t,{className:"mr-2"})," ",s("dashboard.workplace.myProjects")," "]})},{key:"teams",label:e.jsxs(e.Fragment,{children:[e.jsx(n,{className:"mr-2"})," ",s("dashboard.workplace.myTeams")," "]})},{key:"activities",label:e.jsxs(e.Fragment,{children:[e.jsx(f,{className:"mr-2"})," ",s("dashboard.workplace.latestActivities")," "]})},{key:"notifications",label:e.jsx(i,{count:1,offset:[10,0],children:e.jsxs("span",{children:[e.jsx(k,{className:"mr-2"}),s("dashboard.workplace.notifications")]})})}],h=[{id:1,name:s("dashboard.workplace.project1.name"),description:s("dashboard.workplace.project1.desc"),status:s("dashboard.workplace.status.inProgress"),progress:65,members:5},{id:2,name:s("dashboard.workplace.project2.name"),description:s("dashboard.workplace.project2.desc"),status:s("dashboard.workplace.status.completed"),progress:100,members:3},{id:3,name:s("dashboard.workplace.project3.name"),description:s("dashboard.workplace.project3.desc"),status:s("dashboard.workplace.status.planning"),progress:10,members:2},{id:4,name:s("dashboard.workplace.project4.name"),description:s("dashboard.workplace.project4.desc"),status:"2023-06-10",progress:10,members:2},{id:5,name:s("dashboard.workplace.project5.name"),description:s("dashboard.workplace.project5.desc"),status:"2023-06-08",progress:15,members:5},{id:6,name:s("dashboard.workplace.project6.name"),description:s("dashboard.workplace.project6.desc"),status:"2023-06-05",progress:60,members:3}],x=[{id:1,name:s("dashboard.workplace.appStore"),icon:e.jsx(w,{}),description:s("dashboard.workplace.appStore.desc"),badge:s("dashboard.workplace.badge.new"),color:"#1890ff"},{id:2,name:s("dashboard.workplace.mallSystem"),icon:e.jsx(u,{}),description:s("dashboard.workplace.mallSystem.desc"),color:"#52c41a"},{id:3,name:s("dashboard.workplace.collaboration"),icon:e.jsx(n,{}),description:s("dashboard.workplace.collaboration.desc"),color:"#faad14"},{id:4,name:s("dashboard.workplace.docCenter"),icon:e.jsx(N,{}),description:s("dashboard.workplace.docCenter.desc"),color:"#13c2c2"}],b=()=>{const a=new Date().getHours();return a<12?s("dashboard.workplace.greeting.morning"):a<18?s("dashboard.workplace.greeting.afternoon"):s("dashboard.workplace.greeting.evening")},d=a=>e.jsx(o,{hoverable:!0,variant:"borderless",cover:e.jsx("div",{className:"flex items-center justify-center h-32",style:{backgroundColor:`${a.app.color}20`},children:e.jsx(c,{icon:a.app.icon,size:64,style:{backgroundColor:a.app.color,color:"#fff",fontSize:"28px"}})}),children:e.jsx(A,{title:e.jsx("span",{className:"font-semibold",children:a.app.name}),description:a.app.description})});return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[e.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[e.jsx(o,{variant:"borderless",styles:{body:{padding:0}},className:"overflow-hidden",children:e.jsx("div",{className:"bg-gradient-to-r from-blue-500 to-purple-600 flex items-center p-8",children:e.jsxs(v,{size:"large",className:"w-full",children:[e.jsx(c,{size:64,src:r.avatar_url,icon:e.jsx(y,{}),className:"border-2 border-white shadow"}),e.jsx("div",{className:"flex-1",children:e.jsxs(L,{level:3,className:"!text-white !mb-1",children:[b(),",",r.nickname,",",s("dashboard.workplace.welcome")]})}),e.jsx("div",{className:"hidden md:block",children:e.jsxs(D,{className:"text-white/80 text-lg",children:[s("dashboard.workplace.today")," ",new Date().toLocaleDateString("zh-CN",{year:"numeric",month:"long",day:"numeric",weekday:"long"})]})})]})})}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(a=>e.jsx("div",{children:a.badge?e.jsx(i.Ribbon,{text:a.badge,color:a.color,children:e.jsx(d,{app:a})}):e.jsx(d,{app:a})},a.id))}),e.jsx(o,{variant:"borderless",defaultActiveTabKey:"projects",tabList:p,children:e.jsx(l,{itemLayout:"horizontal",dataSource:h,renderItem:a=>e.jsxs(l.Item,{children:[e.jsx(l.Item.Meta,{avatar:e.jsx(c,{icon:e.jsx(t,{})}),title:e.jsx("a",{href:"#",children:a.name}),description:a.description}),e.jsxs("div",{className:"flex flex-col items-end",children:[e.jsx(m,{color:a.status===s("dashboard.workplace.status.completed")?"success":a.status===s("dashboard.workplace.status.inProgress")?"processing":"default",children:a.status}),e.jsxs("div",{className:"mt-2",children:[e.jsxs("span",{className:"text-gray-500 mr-2",children:[s("dashboard.workplace.progress"),": ",a.progress,"%"]}),e.jsxs("span",{className:"text-gray-500",children:[s("dashboard.workplace.members"),": ",a.members,s("dashboard.workplace.people")]})]})]})]})})})]}),e.jsxs("div",{className:"lg:col-span-1",children:[e.jsx(o,{variant:"borderless",className:"mb-5",children:e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx(c,{size:100,src:r.avatar_url,className:"mb-4"}),e.jsx("h2",{className:"text-xl font-bold mb-2",children:r.nickname}),e.jsx(m,{color:"blue",className:"mb-4",children:r.dept_name}),e.jsx("p",{className:"text-gray-700 mb-2 text-center",children:"hello"}),e.jsx(R,{className:"my-3 mb-4"}),e.jsxs("div",{className:"w-full space-y-3",children:[e.jsxs("div",{className:"flex items-center text-gray-600",children:[e.jsx($,{className:"mr-2"}),e.jsx("span",{children:r.email})]}),e.jsxs("div",{className:"flex items-center text-gray-600",children:[e.jsx(S,{className:"mr-2"}),e.jsx("span",{children:r.mobile})]}),e.jsxs("div",{className:"flex items-center text-gray-600",children:[e.jsx(C,{className:"mr-2"}),e.jsx("span",{children:s("dashboard.workplace.location")})]}),e.jsxs("div",{className:"flex items-center text-gray-600",children:[e.jsx(T,{className:"mr-2"}),e.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"text-blue-500",children:"123"})]})]})]})}),e.jsx(o,{variant:"borderless",title:s("dashboard.workplace.recentVisits"),children:e.jsx(z,{})})]})]})};export{q as default};