| Current Path : /snap/lxd/current/share/lxd-ui/assets/ |
| Current File : //snap/lxd/current/share/lxd-ui/assets/UsedByRow-DlstYIKs.js |
import{S as n,bU as u,P as m,T as d,j as s,dK as i,dL as j}from"./index-BsQN_SZU.js";import{U as x}from"./UsedByItem-DYTdOZkC.js";import{E as p}from"./ExpandableList-DsGr0BpD.js";const U=({entityType:e,usedBy:a})=>{if(!a)return null;const{project:o}=n(),t=u(e,a),l=e==="volume"?"Custom volume":m(e.replaceAll("-"," ")),c=d(l,t.length);return s.jsxs("tr",{className:"used-by-row",children:[s.jsxs("th",{className:"u-text--muted used-by-row-header",children:[s.jsx(i,{type:e,className:"icon"}),c," (",t.length,")"]}),s.jsx("td",{children:s.jsx(p,{items:t.map(r=>s.jsx(x,{item:r,activeProject:o?.name||"default",type:e,to:j(r,e)},`${r.name}-${r.project}-${r.target??""}`))})})]})};export{U};