import{_ as a,b as e,c as t,az as n,r as s,u as d,B as l,a as i,h as o,v as c,j as r,f as u,l as p,d as v,F as m,e as g,g as _,t as b,i as x,ac as f,p as h,L as y,b3 as w,T as L,O as k}from"./index.8821dc9f.1766672520393.js";import{b as j}from"./app.66ee061b.1766672520393.js";/* empty css                                                                          */import"./sortable.esm.1bd45607.1766672520393.js";import"./index.bc057590.1766672520393.js";const C={class:"contentLoading"};var z=a({},[["render",function(a,s){return e(),t("div",C,s[0]||(s[0]=[n('<div class="contentLoading-wrapper" data-v-535f8b2c><div class="contentLoading-blue contentLoading-ball" data-v-535f8b2c></div><div class="contentLoading-red contentLoading-ball" data-v-535f8b2c></div><div class="contentLoading-yellow contentLoading-ball" data-v-535f8b2c></div><div class="contentLoading-green contentLoading-ball" data-v-535f8b2c></div></div>',1)]))}],["__scopeId","data-v-535f8b2c"]]);const I={class:"addCardWindow"},B={class:"addCardBox mt-0.5"},G={class:"cardItem"},F={class:"text-center text-base text-black"},O={class:"text-center text-gray-700 text-sm",style:{height:"40px",display:"flex","align-items":"center","justify-content":"center"}},T={key:0,class:"rounded-xl overflow-hidden",style:{height:"160px",width:"100%",margin:"auto","max-width":"370px"}},W=["src"],q={class:"mt-4 flex justify-between"};var A=a({__name:"addCard",setup(a){const n=s(!1),C=d(),A=s([]);l({url:"/card/index"}).then((a=>{1===a.code&&(a.data.map((a=>{j[a.name_en]?(!1===j[a.name_en].auth||C.state.auth)&&A.value.push(a):a.url&&A.value.push(a)})),n.value=!0)}));return(a,s)=>{const d=i("el-empty"),D=i("el-button");return e(),t("div",I,[o(r(z,null,null,512),[[c,!n.value]]),n.value&&0===A.value.length?(e(),u(d,{key:0,description:"目前还没有卡片应用哟！"})):p("",!0),v("div",B,[(e(!0),t(m,null,g(A.value,((a,n)=>(e(),u(L,{key:n},{default:_((()=>[v("div",G,[v("h3",F,b(a.name),1),v("div",O,[v("span",null,b(a.tips),1)]),x(j)[a.name_en]?(e(),t("div",T,[(e(),u(f(x(j)[a.name_en].card),{data:{...x(j)[a.name_en],size:"2x4"}},null,8,["data"]))])):(e(),t("iframe",{key:1,src:x(h)(a.url),class:"mt-2"},null,8,W)),v("div",q,[v("div",null,[s[0]||(s[0]=v("span",{class:"iconfont icon-redu text-red-500 text-lg"},null,-1)),y(" "+b(x(w)(a.install_num)),1)]),r(D,{onClick:e=>(async a=>{let e={sort:99999,id:k(),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:C.state.pageGroup};C.state.link.push(e),C.commit("updateLink"),await l({url:"/card/install_num",method:"post",data:{id:a.id}})})(a),size:"small",round:"",style:{"background-color":"rgba(243,243,243,0.45)"}},{default:_((()=>s[1]||(s[1]=[y("添加 ")]))),_:2},1032,["onClick"])])])])),_:2},1024)))),128))])])}}},[["__scopeId","data-v-5ec1180b"]]);export{A as default};
