import"./rolldown-runtime-BM3Ffeng.js";import{ot as e,ut as t}from"./element-plus-vendor-BF9PNysW.js";import{A as n,E as r,I as i,N as a,P as o,Pt as s,et as c,ht as l,k as u,s as d,y as f}from"./vue-vendor-DMUmTARL.js";import{xi as p}from"./icons-vendor-Buq6V-Ga.js";import{lt as m}from"./index-y6crcKNt.js";var h={key:0},g=i({__name:`ReadmeEditButton`,setup(i){let g=d(),_=m(),v=r(()=>{let e=_.folderConfig.storageId,t=_.folderConfig.readmeConfigId;return _.loginInfo.isAdmin===!0&&typeof e==`number`&&Number.isInteger(e)&&e>0&&typeof t==`number`&&Number.isInteger(t)&&t>0}),y=()=>{let e=_.folderConfig.storageId,t=_.folderConfig.readmeConfigId;!v.value||e===null||t===null||g.push({path:`/admin/storage-readme/${e}`,query:{readmeId:String(t)}})};return(r,i)=>{let d=e,m=t;return s(v)?(c(),n(`div`,h,[o(m,{content:`编辑目录文档`,placement:`top`},{default:l(()=>[o(d,{type:`primary`,link:``,icon:s(p),size:`small`,onClick:f(y,[`stop`])},{default:l(()=>[...i[0]||=[a(` 编辑 `,-1)]]),_:1},8,[`icon`])]),_:1})])):u(``,!0)}}});export{g as t};