import{j as s,n as i,bI as h,B as n,bJ as d}from"./index-CHfgriyV.js";function x({snapshot:a,source:e}){return s.jsxs("div",{className:"flex flex-col justify-between gap-3 md:flex-row",children:[s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(i,{variant:"source",radius:"sqrt",className:"uppercase",children:a.sources[e]?.importer.type}),a.sources[e]?.importer.origin]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(i,{variant:"transparent",radius:"sqrt",leftIcon:"folder",children:s.jsx("span",{className:"font-medium",children:a.sources[e]?.summary.Total.size.Pretty})}),s.jsx(h,{items:a.tags,variant:"blue_borderless",radius:"sqrt",maxRows:4})]})]})}function j(a,e,r){return[s.jsx(n.Crumb,{to:"/snapshots",children:"Snapshots"},"snapshots"),s.jsx(n.Crumb,{to:"/snapshots/$snapshotId/$source/browse",params:{snapshotId:a.Value,source:e},search:o=>({...o,preview:void 0,path:`${r.Value}/`,page:0}),monospace:!0,children:s.jsxs("div",{className:"flex items-center gap-1",children:[a.toHumanString(),s.jsx(d,{content:a.Value,tooltip:"Copy full snapshot ID",className:"-my-1"})]})},"identifier")]}function f(a,e,r,p){let o=p;const l=[];r.Value&&p.startsWith(r.Value)?(o=o.slice(r.Value.length),l.push(s.jsx(n.Crumb,{to:"/snapshots/$snapshotId/$source/browse",params:{snapshotId:a.Value,source:e},search:t=>({...t,preview:void 0,path:`${r.Value}/`,page:0}),children:r.toHumanString()},"scannedDirectory"))):l.push(s.jsx(n.Crumb,{to:"/snapshots/$snapshotId/$source/browse",params:{snapshotId:a.Value,source:e},search:t=>({...t,preview:void 0,path:"/",page:0}),children:"/"},"scannedDirectory"));const u=o.split("/").filter(t=>t!=="");return u.forEach((t,c)=>{l.push(s.jsx(n.Crumb,{to:"/snapshots/$snapshotId/$source/browse",params:{snapshotId:a.Value,source:e},search:m=>({...m,preview:void 0,path:`${r.Value}/${u.slice(0,c+1).join("/")}`,page:0}),children:t},`path-part-${c}`))}),l}export{x as M,j as a,f as b};
