import{r as e}from"./chunk-CilyBKbf.js";import{$ as t,V as n,d as r,f as i,ft as a,h as o,l as s,m as c,ot as l,p as u,pt as d,q as f,rt as p}from"./index-BlxIUgpX.js";var m=a(),h=l((0,m.jsx)(`path`,{d:`M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9zm-4 10H4V5h14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z`}),`DeveloperBoardOutlined`),g=e(d(),1),_=e=>{let t=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return`${t}:${n.toString().padStart(2,`0`)}:${r.toString().padStart(2,`0`)}`},v=()=>{let{t:e}=n(),{version:a}=s(),{clashConfig:l}=i(),{rules:d}=u(),{uptime:v}=o(),{systemProxyAddress:y}=c(),b=(0,g.useMemo)(()=>_(v),[v]),x=(0,g.useMemo)(()=>l?(0,m.jsxs)(f,{spacing:1.5,children:[(0,m.jsxs)(f,{direction:`row`,sx:{justifyContent:`space-between`},children:[(0,m.jsx)(p,{variant:`body2`,color:`text.secondary`,children:e(`home.components.clashInfo.fields.coreVersion`)}),(0,m.jsx)(p,{variant:`body2`,sx:{fontWeight:`medium`},children:a||`-`})]}),(0,m.jsx)(t,{}),(0,m.jsxs)(f,{direction:`row`,sx:{justifyContent:`space-between`},children:[(0,m.jsx)(p,{variant:`body2`,color:`text.secondary`,children:e(`home.components.clashInfo.fields.systemProxyAddress`)}),(0,m.jsx)(p,{variant:`body2`,sx:{fontWeight:`medium`},children:y})]}),(0,m.jsx)(t,{}),(0,m.jsxs)(f,{direction:`row`,sx:{justifyContent:`space-between`},children:[(0,m.jsx)(p,{variant:`body2`,color:`text.secondary`,children:e(`home.components.clashInfo.fields.mixedPort`)}),(0,m.jsx)(p,{variant:`body2`,sx:{fontWeight:`medium`},children:l.mixedPort||`-`})]}),(0,m.jsx)(t,{}),(0,m.jsxs)(f,{direction:`row`,sx:{justifyContent:`space-between`},children:[(0,m.jsx)(p,{variant:`body2`,color:`text.secondary`,children:e(`home.components.clashInfo.fields.uptime`)}),(0,m.jsx)(p,{variant:`body2`,sx:{fontWeight:`medium`},children:b})]}),(0,m.jsx)(t,{}),(0,m.jsxs)(f,{direction:`row`,sx:{justifyContent:`space-between`},children:[(0,m.jsx)(p,{variant:`body2`,color:`text.secondary`,children:e(`home.components.clashInfo.fields.rulesCount`)}),(0,m.jsx)(p,{variant:`body2`,sx:{fontWeight:`medium`},children:d.length})]})]}):null,[l,a,e,b,d.length,y]);return(0,m.jsx)(r,{title:e(`home.components.clashInfo.title`),icon:(0,m.jsx)(h,{}),iconColor:`warning`,action:null,children:x})};export{v as ClashInfoCard};