import{n as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{n,t as r}from"./x-Dh43gJN9.js";import{n as i}from"./iframe-DaN-XFub.js";import{a,i as o}from"./utils-DUM89eIj.js";var s,c,l,u,d,f,p;function m(){return(m=e((()=>{s=`h9SMea`,c=`rUyh0y`,l=`Q0CY1r`,u=`AJuYXd`,d=`CKKkOD`,f=`UgxhS1`,p={control:s,hiddenInput:c,fileList:l,fileItem:u,fileItemName:d,removeButton:f}})))()}function h({files:e,onChange:t}){let n=(0,g.useCallback)(n=>{t(e.filter((e,t)=>t!==n))},[e,t]);return!e||!e.length?null:(0,_.jsx)(`ul`,{className:p.fileList,children:e.map((e,t)=>(0,_.jsxs)(`li`,{className:p.fileItem,children:[(0,_.jsx)(`span`,{className:p.fileItemName,children:e.meta.name}),(0,_.jsx)(`button`,{type:`button`,className:a(p.removeButton,`flexCenter`),onClick:()=>n(t),"aria-label":`Удалить ${e.meta.name}`,children:(0,_.jsx)(r,{})})]},`${e.meta.name}-${e.meta.lastModified}`))})}var g,_;function v(){return(v=e((()=>{g=t(),o(),n(),m(),_=i(),h.__docgenInfo={description:``,methods:[],displayName:`InputFilesList`,props:{files:{required:!0,tsType:{name:`Array`,elements:[{name:`TFile`}],raw:`TFile[]`},description:``},onChange:{required:!0,tsType:{name:`signature`,type:`function`,raw:`(files: TFile[]) => void`,signature:{arguments:[{type:{name:`Array`,elements:[{name:`TFile`}],raw:`TFile[]`},name:`files`}],return:{name:`void`}}},description:``}}}})))()}export{m as i,v as n,p as r,h as t};