import{_ as e}from"./index105.js?v=1761009159";import{an as s,e as r,P as t,M as a,cN as l,ao as o}from"./utils-lib.js?v=1761009159";import{c as i,s as n,e as p,C as u,v as m,x as c,B as d,y as h}from"./base-lib.js?v=1761009159";import{b as _}from"./index96.js?v=1761009159";import{a as f}from"./index486.js?v=1761009159";import{B as x}from"./index484.js?v=1761009159";import{u as j}from"./column.js?v=1761009159";import{u as g}from"./useController5.js?v=1761009159";import{a3 as b}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]"},w=i({__name:"theme-install",setup(i){const{localRow:w}=n(g()),{isRefreshThemeInstall:B,isRefreshThemeList:q}=n(_()),{BtTable:y,BtPage:C,BtRecommendSearch:R,BtRefresh:P,BtColumn:T,BtBatch:k,BtTableCategory:S,BtErrorMask:L,tableRef:M,classList:H,refresh:W,BtSearch:E}=s({request:e=>f(e),columns:[{label:"名称",prop:"name",minWidth:180,isCustom:!0,render:e=>p("span",{class:"flex items-center"},[p("img",{class:"w-[25px] h-[25px]",src:e.screenshot_url},null),p("span",{class:"ml-[5px]"},[e.name])])},{label:"描述",width:200,prop:"description",showOverflowTooltip:!0},{label:"作者",prop:"author",render:e=>p(r,{target:"_blank",href:e.author.author_url},{default:()=>[e.author.author]})},{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 p("div",{class:"flex items-center"},[p(x,{modelValue:s,disabled:!0,"allow-half":!0,class:"!text-extraLarge"},null)])}},j(e=>[{title:e.installed?"已安装":"安装",render:e=>{const s=w.value.wp_version<e.requires||w.value.php_version<e.requires_php||e.installed;return e.installed?p("span",{class:"text-tertiary",style:"cursor:not-allowed"},[u("已安装")]):p("span",{class:"bt-link",style:s?"cursor:not-allowed; color: var(--el-base-tertiary);":"",onClick:s?void 0:()=>{t({loading:"安装中...",request:b({s_id:w.value.id,slug:e.slug}),success:e=>{e.status&&(B.value=!0,q.value=!0,a.success("安装成功"))}})}},[u("安装")])}}],{label:"操作",width:100,fixed:"right"})],extension:[l("search",{name:"local-setting-plugin",list:[]}),o(B)]});return(s,r)=>{const t=e;return m(),c("div",v,[p(t,null,{"header-right":d(()=>[p(h(E),{type:"local-setting-theme",placeholder:"请输入主题名称",class:"!w-[270px] mr-[10px]"})]),content:d(()=>[p(h(y),{"max-height":500})]),"footer-right":d(()=>[p(h(C))]),_:1})])}}});export{w as default};
