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 c,v as o,j as r,f as u,l as p,d as v,F as m,e as _,g,t as x,i as f,ac as b,p as h,L as y,b3 as w,T as L,O as k}from"./index.5f1a5861.1761573291572.js";import{b as j}from"./app.54bed779.1761573291572.js";/* empty css                                                                          */import"./sortable.esm.2af2a611.1761573291572.js";import"./index.120c15d8.1761573291572.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-6c2a997c><div class="contentLoading-blue contentLoading-ball" data-v-6c2a997c></div><div class="contentLoading-red contentLoading-ball" data-v-6c2a997c></div><div class="contentLoading-yellow contentLoading-ball" data-v-6c2a997c></div><div class="contentLoading-green contentLoading-ball" data-v-6c2a997c></div></div>',1)]))}],["__scopeId","data-v-6c2a997c"]]);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,[c(r(z,null,null,512),[[o,!n.value]]),n.value&&0===A.value.length?(e(),u(d,{key:0,description:"目前还没有卡片应用哟！"})):p("",!0),v("div",B,[(e(!0),t(m,null,_(A.value,((a,n)=>(e(),u(L,{key:n},{default:g((()=>[v("div",G,[v("h3",F,x(a.name),1),v("div",O,[v("span",null,x(a.tips),1)]),f(j)[a.name_en]?(e(),t("div",T,[(e(),u(b(f(j)[a.name_en].card),{data:{...f(j)[a.name_en],size:"2x4"}},null,8,["data"]))])):(e(),t("iframe",{key:1,src:f(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(" "+x(f(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:g((()=>s[1]||(s[1]=[y("添加 ",-1)]))),_:2,__:[1]},1032,["onClick"])])])])),_:2},1024)))),128))])])}}},[["__scopeId","data-v-5ec1180b"]]);export{A as default};
