import{_ as a,b as e,c as t,ap 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 x,i as b,ad as f,p as h,L as y,b7 as w,T as L,O as k}from"./index.9f83bdd8.1783337707176.js";import{b as j}from"./app.7aadae50.1783337707176.js";/* empty css                                                                          */import"./sortable.esm.6dc18407.1783337707176.js";import"./index.371c1200.1783337707176.js";import"./wangEditor.88705975.1783337707176.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"},E={class:"text-center text-base text-black"},F={class:"text-center text-gray-700 text-sm",style:{height:"40px",display:"flex","align-items":"center","justify-content":"center"}},O={key:0,class:"rounded-xl overflow-hidden",style:{height:"160px",width:"100%",margin:"auto","max-width":"370px"}},T=["src"],W={class:"mt-4 flex justify-between"};var q=a({__name:"addCard",setup(a){const n=s(!1),C=d(),q=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)&&q.value.push(a):a.url&&q.value.push(a)})),n.value=!0)}));return(a,s)=>{const d=i("el-empty"),A=i("el-button");return e(),t("div",I,[o(r(z,null,null,512),[[c,!n.value]]),n.value&&0===q.value.length?(e(),u(d,{key:0,description:"目前还没有卡片应用哟！"})):p("",!0),v("div",B,[(e(!0),t(m,null,g(q.value,((a,n)=>(e(),u(L,{key:n},{default:_((()=>[v("div",G,[v("h3",E,x(a.name),1),v("div",F,[v("span",null,x(a.tips),1)]),b(j)[a.name_en]?(e(),t("div",O,[(e(),u(f(b(j)[a.name_en].card),{data:{...b(j)[a.name_en],size:"2x4"}},null,8,["data"]))])):(e(),t("iframe",{key:1,src:b(h)(a.url),class:"mt-2"},null,8,T)),v("div",W,[v("div",null,[s[0]||(s[0]=v("span",{class:"iconfont icon-redu text-red-500 text-lg"},null,-1)),y(" "+x(b(w)(a.install_num)),1)]),r(A,{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-27576c90"]]);export{q as default};
