import{a as g,k as f}from"./vendor-query-BjC2S-sR.js";import{V as x,W as b,aS as v,G as C,aT as F}from"./feature-order-C2we0F5o.js";import{r as m,j as t}from"./vendor-react-C630P38J.js";import{q as u}from"./vendor-fxts-IS4CCBC4.js";import"./vendor-utils-Cb1MAKRV.js";const K=({searchParams:o,options:s})=>g({queryKey:x.list(o),queryFn:async()=>{const{data:i}=await b.getClaimList(o);return i},...s,placeholderData:f,enabled:(s==null?void 0:s.enabled)??!0});var k="g0yj880",h="g0yj881",L="g0yj882",U="g0yj883",E="g0yj884";const $=({initialFileList:o,setFileList:s,maxLength:i=3})=>{const{uploadFileHandler:p,deleteUploadFileImage:c}=v({maxSize:12582912,maxLength:i}),[a,n]=m.useState(()=>o),d=()=>{var e;(e=document.getElementById("uploadFileInput"))==null||e.click()};return m.useEffect(()=>{s(a)},[a,s]),t.jsxs("div",{className:k,children:[!u(a)&&t.jsx("ul",{className:h,children:a.map((e,l)=>t.jsxs("li",{className:L,children:[typeof e=="string"?t.jsx("img",{src:e,alt:e}):t.jsx("img",{src:URL.createObjectURL(e),alt:e.name??""}),t.jsx("button",{className:U,type:"button",onClick:r=>{r.stopPropagation(),n(y=>y.filter((N,j)=>j!==l)),typeof e!="string"&&c(e.name??"")},children:t.jsx(C,{})})]},l))}),a.length{const l=p(e);l&&!u(l)&&n(r=>[...r,...l])},style:{display:"none"}}),t.jsx(F,{}),`${a.length} / ${i}`]})]})};export{$ as F,K as u};