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