import{_ as a,r as e,u as s,B as t,a as n,P as l,i,b as d,c as r,g as o,m as u,d as c,F as m,f as p,h as x,x as v,j as _,a9 as g,q as h,J as f,aX as y,k as b,T as k,M as w}from"./index.51eb0e02.1749480002384.js";import{b as j}from"./app.4e4ee3e1.1749480002384.js";import"./index.17be3941.1749480002384.js";import"./wangEditor.b189ca34.1749480002384.js";import"./sortable.esm.218539f1.1749480002384.js";const C={class:"addCardWindow"},z={class:"addCardBox mt-0.5"},B={class:"cardItem"},G={class:"text-center text-base text-black"},I={class:"text-center text-gray-700 text-sm",style:{height:"40px",display:"flex","align-items":"center","justify-content":"center"}},q={key:0,class:"rounded-xl overflow-hidden",style:{height:"160px",width:"360px",margin:"auto"}},E=["src"],F={class:"mt-4 flex justify-between"};var J=a({__name:"addCard",setup(a){const J=e(!1),L=s(),M=e([]);t({url:"/card/index"}).then((a=>{1===a.code&&(a.data.map((a=>{j[a.name_en]?(!1===j[a.name_en].auth||L.state.auth)&&M.value.push(a):a.url&&M.value.push(a)})),J.value=!0)}));return(a,e)=>{const s=n("el-empty"),P=n("el-button"),T=l("loading");return i((d(),r("div",C,[J.value&&0===M.value.length?(d(),o(s,{key:0,description:"目前还没有卡片应用哟！"})):u("",!0),c("div",z,[(d(!0),r(m,null,p(M.value,((a,s)=>(d(),o(k,{key:s},{default:x((()=>[c("div",B,[c("h3",G,v(a.name),1),c("div",I,[c("span",null,v(a.tips),1)]),_(j)[a.name_en]?(d(),r("div",q,[(d(),o(g(_(j)[a.name_en].card),{data:{..._(j)[a.name_en],size:"2x4"}},null,8,["data"]))])):(d(),r("iframe",{key:1,src:_(h)(a.url),class:"mt-2"},null,8,E)),c("div",F,[c("div",null,[e[0]||(e[0]=c("span",{class:"iconfont icon-redu text-red-500 text-lg"},null,-1)),f(" "+v(_(y)(a.install_num)),1)]),b(P,{onClick:e=>(async a=>{let e={sort:99999,id:w(),name:a.name,name_en:a.name_en,size:"2x4",src:a.src,url:a.url,window:a.window,type:"component",component:"plugins",app:1,tips:a.tips,version:a.version,origin_id:a.id,pageGroup:L.state.pageGroup};L.state.link.push(e),L.commit("updateLink"),await t({url:"/card/install_num",method:"post",data:{id:a.id}})})(a),size:"small",round:"",style:{"background-color":"rgba(243,243,243,0.45)"}},{default:x((()=>e[1]||(e[1]=[f("添加 ")]))),_:2},1032,["onClick"])])])])),_:2},1024)))),128))])])),[[T,!J.value]])}}},[["__scopeId","data-v-15e3701a"]]);export{J as default};
