import{t as e}from"./jsx-runtime-CiQ1k8xo.js";import{t}from"./clsx-BcPLHiun.js";import{G as n,W as r,h as i,lt as a}from"./vscode-api-DjORcpSo.js";import{t as o}from"./x-DypUcSQe.js";var s=20,c=r(i,[]),l=n(i,e=>null,void 0,{key:d});function u(e,t,n,r){if(r==null||n==null)return;let i={bundleIdentifier:t,imageName:n};if(e.get(l,i)===r)return;e.set(l,i,r);let a=d(i),o=[...e.get(c).filter(e=>d(e)!==a),i],u=o.slice(0,Math.max(0,o.length-s));for(let t of u)e.set(l,t,null);e.set(c,o.slice(u.length))}function d(e){return`${e.bundleIdentifier}\0${e.imageName??``}`}var f=a(),p=e();function m(e){let n=(0,f.c)(9),{ariaLabel:r,className:i,onRemove:a}=e,s=i===void 0?`top-1 right-1`:i,c;n[0]===s?c=n[1]:(c=t(`absolute flex size-4 cursor-interaction items-center justify-center rounded-full bg-token-foreground text-token-dropdown-background shadow-sm`,s),n[0]=s,n[1]=c);let l;n[2]===a?l=n[3]:(l=e=>{e.preventDefault(),e.stopPropagation(),a()},n[2]=a,n[3]=l);let u;n[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,p.jsx)(o,{className:`icon-xxs`}),n[4]=u):u=n[4];let d;return n[5]!==r||n[6]!==c||n[7]!==l?(d=(0,p.jsx)(`button`,{type:`button`,className:c,onPointerDown:h,onClick:l,"aria-label":r,children:u}),n[5]=r,n[6]=c,n[7]=l,n[8]=d):d=n[8],d}function h(e){e.preventDefault(),e.stopPropagation()}export{l as n,u as r,m as t};
//# sourceMappingURL=attachment-remove-button-IK_O-aB4.js.map