import{n as p}from"./rolldown-runtime-M0oDzQ_3.js";import{Kn as F,Qt as f,Rn as t,Rt as k,Zt as v,_n as N,an as B,en as E,in as i,yn as r}from"./ui-vendor-CepnLjNg.js";import{n as U,t as C}from"./_plugin-vue_export-helper-BP_yjQAc.js";import{G as P,W as T}from"./index-BxPouqCs.js";import{_ as L,a as G,b as I,c as K,d as Q,f as W,g as Z,h as $,i as j,l as q,m as z,n as A,o as D,p as H,r as J,s as O,t as X,u as Y,v as ee,y as ie}from"./FileRenameModal-DmTphwX7.js";var w,c,h,y,x,M=p((()=>{k(),ie(),T(),ee(),Z(),z(),W(),Y(),K(),D(),j(),A(),w={class:"files-view"},c={class:"files-tree-panel"},h={class:"files-main-panel"},y={class:"files-content"},x=B({__name:"FilesView",setup(ne){const _=I(),u=P(),m=t(null),d=t(!1),l=t(!1),a=t("newFile"),n=t(null);function R(s,e){m.value?.show(s,e)}function S(){a.value="newFile",n.value=null,l.value=!0}function b(){a.value="newFolder",n.value=null,l.value=!0}function g(s){a.value="rename",n.value=s,l.value=!0}async function V(){(!u.activeProfileName||u.profiles.length===0)&&await u.fetchProfiles(),await _.fetchEntries("")}return N(()=>{V()}),(s,e)=>(r(),E("div",w,[v("div",c,[i(L)]),v("div",h,[i(H,{onShowNewFile:S,onShowNewFolder:b,onShowUpload:e[0]||(e[0]=o=>d.value=!0)}),i($),v("div",y,[F(_).editingFile?(r(),f(O,{key:0})):F(_).previewFile?(r(),f(G,{key:1})):(r(),f(Q,{key:2,onContextmenuEntry:R}))])]),i(q,{ref_key:"contextMenuRef",ref:m,onRename:g},null,512),i(J,{show:d.value,"onUpdate:show":e[1]||(e[1]=o=>d.value=o)},null,8,["show"]),i(X,{show:l.value,"onUpdate:show":e[2]||(e[2]=o=>l.value=o),mode:a.value,entry:n.value},null,8,["show","mode","entry"])]))}})})),le=p((()=>{})),te,ae=p((()=>{M(),M(),le(),U(),te=C(x,[["__scopeId","data-v-89d440cf"]])}));ae();export{te as default};
