import{c as a,r as e,aA as l,q as s,H as t,I as i,y as n,v as p,x as m,z as o,e as c,Q as r,F as u,b0 as d,N as f,D as v,K as x,A as _,C as b,B as D,G as h,ax as y}from"./base-lib.js?v=1761009159";import{aC as g,f as w,e as k,_ as C}from"./utils-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const j={class:"flex h-[46rem]"},z={class:"p-[20px] pl-0 grid grid-cols-2 gap-x-4 w-full h-[46rem] overflow-auto"},H={class:"flex flex-col items-start leading-10 flex-1"},I={class:"text-medium mb-[4px]"},L={class:"truncate inline-block w-[80%]"},S=["innerHTML"],T={class:"truncate inline-block w-[80%]"},V={class:"truncate inline-block w-[80%]"},A={class:"flex items-center flex-1"},M={class:"flex items-center flex-1"},q=C(a({__name:"other-template",props:{compData:{default:()=>{}}},setup(a){const C=a,q=e(""),B=e(),F=e(C.compData.templateData.list),G=e(C.compData.templateId),K=e(!1),N=l("popupClose"),Q=a=>{F.value="all"===a?C.compData.templateData.list:""===a?C.compData.templateData.list.filter(a=>0===a.is_many):C.compData.templateData.list.filter(e=>String(e.type)===a)};return s(()=>{K.value=!0,B.value=C.compData.templateData.dep_type.map(a=>({label:a.title,name:String(a.tid),lazy:!0})),B.value.unshift({label:"全部",name:"all",lazy:!0}),B.value.unshift({label:"精选推荐",name:"",lazy:!0}),q.value=String(B.value[0].name),F.value=C.compData.templateData.list.filter(a=>0===a.is_many),K.value=!1}),(a,e)=>{const l=g,s=w,U=k,E=h,J=y,O=t("bt-loading");return i((p(),m("div",j,[o("div",null,[c(l,{class:"w-full !h-full",type:"left-bg-card",modelValue:n(q),"onUpdate:modelValue":e[0]||(e[0]=a=>r(q)?q.value=a:null),options:n(B),onChange:Q},null,8,["modelValue","options"])]),o("div",z,[(p(!0),m(u,null,d(n(F),a=>(p(),m("div",{key:a.id,class:x([{"template-focus":n(G)===a.id},"mb-[8px] flex p-[20px] rounded-base h-[18rem] template-hover"])},[c(s,{src:"/site_dep_ico/".concat(a.name.toLowerCase(),".png"),class:"!max-h-[3.6rem] !max-w-[4rem] mr-[8px]"},null,8,["src"]),o("div",H,[o("span",I,_(a.title),1),o("span",L,[e[1]||(e[1]=b(" 简介：",-1)),o("span",{innerHTML:a.ps},null,8,S)]),o("span",T," 版本："+_(a.version),1),o("span",V," 评分："+_(a.score),1),o("div",A,[o("span",M,[e[2]||(e[2]=o("div",{class:"flex-1"},"官网：",-1)),c(U,{class:"!truncate w-[10.6rem]",href:a.official},{default:D(()=>[b(_(a.official),1)]),_:2},1032,["href"])]),c(E,{type:"primary",class:"!ml-[12px]",onClick:e=>(a=>{G.value=a.id,C.compData.selectTemplate(a.id),N()})(a)},{default:D(()=>e[3]||(e[3]=[b("选择模板",-1)])),_:2,__:[3]},1032,["onClick"])])])],2))),128)),n(F).length?v("",!0):(p(),f(J,{key:0,description:"暂无数据",class:"w-200%"}))])])),[[O,n(K)]])}}}),[["__scopeId","data-v-ef3b1d12"]]);export{q as default};
