import{j as h,r as w}from"./iframe-B8FSoBNY.js";import{c as A}from"./compiler-runtime-BXE7OOXE.js";import{R as B}from"./resource-badge-Bw5UoU4J.js";import{S as E}from"./stack-CN4X31TA.js";const q="md",L="neutral",P=S=>{const e=A.c(25),{attachments:p,onSelect:t,onRemove:n,renderBadge:s,size:v,tone:y}=S;let l;e[0]!==p?(l=p===void 0?[]:p,e[0]=p,e[1]=l):l=e[1];const u=l,o=v===void 0?q:v,a=y===void 0?L:y;let g;e[2]!==t?(g=r=>{t?.(r)},e[2]=t,e[3]=g):g=e[3];const c=g;let f;e[4]!==n?(f=r=>{n?.(r)},e[4]=n,e[5]=f):f=e[5];const d=f;if(u.length===0)return null;let i;if(e[6]!==u||e[7]!==d||e[8]!==c||e[9]!==n||e[10]!==t||e[11]!==s||e[12]!==o||e[13]!==a){let r;e[15]!==d||e[16]!==c||e[17]!==n||e[18]!==t||e[19]!==s||e[20]!==o||e[21]!==a?(r=m=>{const x=t?()=>c(m):void 0,I=n?()=>d(m):void 0;if(s){const T=s({attachmentId:m,onSelect:x,onRemove:I,size:o,tone:a});return h.jsx(w.Fragment,{children:T},m)}return h.jsx(B,{fileName:m,onSelect:x,onRemove:I,size:o,tone:a},m)},e[15]=d,e[16]=c,e[17]=n,e[18]=t,e[19]=s,e[20]=o,e[21]=a,e[22]=r):r=e[22],i=u.map(r),e[6]=u,e[7]=d,e[8]=c,e[9]=n,e[10]=t,e[11]=s,e[12]=o,e[13]=a,e[14]=i}else i=e[14];let R;return e[23]!==i?(R=h.jsx(E,{marginBottom:"sm",gap:"1",flexDir:"row",flexWrap:"wrap",children:i}),e[23]=i,e[24]=R):R=e[24],R};P.__docgenInfo={description:"Simple attachment list component that displays resource badges.",methods:[],displayName:"AttachmentList",props:{attachments:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},onSelect:{required:!1,tsType:{name:"signature",type:"function",raw:"(attachmentId: string) => void",signature:{arguments:[{type:{name:"string"},name:"attachmentId"}],return:{name:"void"}}},description:""},onRemove:{required:!1,tsType:{name:"signature",type:"function",raw:"(attachmentId: string) => void",signature:{arguments:[{type:{name:"string"},name:"attachmentId"}],return:{name:"void"}}},description:""},renderBadge:{required:!1,tsType:{name:"signature",type:"function",raw:"(props: AttachmentListItemRenderProps) => ReactNode",signature:{arguments:[{type:{name:"AttachmentListItemRenderProps"},name:"props"}],return:{name:"ReactNode"}}},description:""},size:{required:!1,tsType:{name:'ResourceBadgeProps["size"]',raw:'ResourceBadgeProps["size"]'},description:""},tone:{required:!1,tsType:{name:'ResourceBadgeProps["tone"]',raw:'ResourceBadgeProps["tone"]'},description:""}}};export{P as A};
