import{_ as e}from"./index105.js?v=1761009159";import{an as s,P as r,M as t,cN as l,ao as a}from"./utils-lib.js?v=1761009159";import{c as i,s as o,e as n,C as p,v as u,x as m,B as c,y as d}from"./base-lib.js?v=1761009159";import{b as h}from"./index96.js?v=1761009159";import{g as _}from"./index486.js?v=1761009159";import{B as x}from"./index484.js?v=1761009159";import{u as f}from"./column.js?v=1761009159";import{u as g}from"./useController5.js?v=1761009159";import{a2 as j}from"./useMethod5.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1761009159";import"./index133.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./index.vue_vue_type_style_index_0_scoped_cdc7f4d3_lang.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./site.js?v=1761009159";import"./useStore13.js?v=1761009159";import"./form-item.js?v=1761009159";import"./useController6.js?v=1761009159";const v={class:"p-[2rem]"},b=i({__name:"plugin-install",setup(i){const{localRow:b}=o(g()),{isRefreshPluginInstall:w,isRefreshPluginList:B}=o(h()),{BtTable:q,BtPage:y,BtRecommendSearch:C,BtRefresh:P,BtColumn:R,BtBatch:L,BtTableCategory:M,BtErrorMask:S,tableRef:T,classList:k,refresh:H,BtSearch:W}=s({request:e=>_(e),columns:[{label:"名称",prop:"name",minWidth:180,isCustom:!0,render:e=>n("span",{class:"flex items-center"},[n("img",{class:"w-[25px] h-[25px]",src:e.icons["1x"]?e.icons["1x"]:e.icons.default},null),n("span",{class:"ml-[5px]"},[e.name])])},{label:"描述",width:200,prop:"short_description",showOverflowTooltip:!0},{label:"作者",prop:"author",render:e=>n("span",{innerHTML:e.author},null)},{label:"WP",prop:"requires",width:50,render:e=>e.requires?e.requires:"--"},{label:"PHP",prop:"requires_php",render:e=>e.requires_php?e.requires_php:"--"},{label:"等级",prop:"rating",width:140,render:e=>{const s=e.rating?e.rating/20:0;return n("div",{class:"flex items-center"},[n(x,{modelValue:s,disabled:!0,"allow-half":!0,class:"!text-extraLarge"},null)])}},f(e=>[{title:e.installed?"已安装":"安装",render:e=>{const s=b.value.wp_version<e.requires||b.value.php_version<e.requires_php||e.installed;return e.installed?n("span",{class:"text-tertiary",style:"cursor:not-allowed"},[p("已安装")]):n("span",{class:"bt-link",style:s?"cursor:not-allowed; color: var(--el-base-tertiary);":"",onClick:s?void 0:()=>{r({loading:"安装中...",request:j({s_id:b.value.id,slug:e.slug}),success:e=>{e.status&&(w.value=!0,B.value=!0,t.success("安装成功"))}})}},[p("安装")])}}],{label:"操作",width:100,fixed:"right"})],extension:[l("search",{name:"local-setting-plugin",list:[]}),a(w)]});return(s,r)=>{const t=e;return u(),m("div",v,[n(t,null,{"header-right":c(()=>[n(d(W),{type:"local-setting-plugin",placeholder:"请输入插件名称",class:"!w-[270px] mr-[10px]"})]),content:c(()=>[n(d(q),{"max-height":500})]),"footer-right":c(()=>[n(d(y))]),_:1})])}}});export{b as default};
