import{r as e}from"./rolldown-runtime-BM3Ffeng.js";import{E as t,I as n,O as r,et as i}from"./vue-vendor-DMUmTARL.js";import{n as a,t as o}from"./admin-storage-BUsF0XeM.js";import{t as s}from"./StorageFolderPickerDialog-BD7Kqi-d.js";var c=n({__name:`StoragePathPickerDialog`,props:{modelValue:{type:Boolean},title:{default:`选择路径`},storageItem:{},initPath:{default:`/`}},emits:[`update:modelValue`,`confirm`],setup(e,{emit:n}){let c=e,l=n,u=t({get:()=>c.modelValue,set:e=>l(`update:modelValue`,e)}),d=async e=>{let t={type:c.storageItem.type,storageSourceAllParam:c.storageItem.storageSourceAllParam||{},path:e};return((c.storageItem.id?await o(c.storageItem.id,t):await a(t))?.data||[]).map(e=>({name:e.name,path:e.path,fullPath:e.fullPath}))};return(t,n)=>(i(),r(s,{modelValue:u.value,"onUpdate:modelValue":n[0]||=e=>u.value=e,title:e.title,"init-path":e.initPath,"load-folders":d,onConfirm:n[1]||=e=>l(`confirm`,e)},null,8,[`modelValue`,`title`,`init-path`]))}}),l=e({default:()=>u}),u=c;export{l as n,u as t};