import{h as a}from"./p-CAus4tQt.js";import{Z as t}from"./p-Yhz3X6iS.js";import{g as o}from"./p-DrCYkHs5.js";import{r as s}from"./p-DKrliuRO.js";const r=({item:r,expandText:e,onDelete:i})=>{const{name:n}=r,m=s.get("theme"),l=Boolean(r.color),p=r.color||"var(--color-background-dark)";return a("div",{class:"z-tag-or-status-item "+(l?"":"border border-primary"),style:{backgroundColor:l?p:""},"data-theme":m},r.iconName&&a("img",{src:`https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/${r.iconName}.png`,alt:"agent avatar",class:"z-tag-or-status-item-icon",loading:"lazy"}),r.subIconName&&a("img",{src:`https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/${r.subIconName}.png`,alt:"agent avatar",class:"z-tag-or-status-item-icon",loading:"lazy"}),a("span",{title:n,class:`z-tag-or-status-item-name ${e?"whitespace-pre-line":"truncate"} ${l?"":"text-primary"}`,style:{color:l?o(p):void 0}},n),i&&a(t,{variant:"none",iconName:"X",noPadding:!0,noPaddingY:!0,addClassIcon:"size-3 "+(l?"":"text-primary"),onClick:a=>{a.stopPropagation(),i()}}))};export{r as Z}