import{u as R,q as L,D as U}from"./links.96ffe3f0.js";import{C as V}from"./Card.b1cf2e4d.js";import{G as B,a as F}from"./Row.e69aefbc.js";import{S as N}from"./Checkmark.74f4bcd8.js";import{c as z}from"./index.57ad6f19.js";import{S as j}from"./Download.9d11d73b.js";import{T as O,a as G}from"./Row.d1dc61bd.js";import{r as e,P as J,c as r,g as s,w as o,o as n,a as l,B as c,x as a,J as M,d as v,F as d,b as f,n as w,C}from"./vue.runtime.esm-bundler.f433d23f.js";import{_ as q}from"./_plugin-vue_export-helper.3febc96a.js";import"./default-i18n.41786823.js";import"./isArrayLikeObject.7c69e632.js";import"./Tooltip.6a8793f6.js";import"./Caret.b5c2e4ec.js";import"./Slide.99d45c60.js";/* empty css                                            */const W={setup(){return{rootStore:R(),toolsStore:L()}},components:{CoreCard:V,GridColumn:B,GridRow:F,SvgCheckmark:N,SvgCopy:z,SvgDownload:j,TableColumn:O,TableRow:G},data(){return{copied:!1,emailError:null,emailAddress:null,sendingEmail:!1,strings:{systemStatusInfo:this.$t.__("System Status Info",this.$td),downloadSystemInfoFile:this.$t.__("Download System Info File",this.$td),copyToClipboard:this.$t.__("Copy to Clipboard",this.$td),emailDebugInformation:this.$t.__("Email Debug Information",this.$td),submit:this.$t.__("Submit",this.$td),wordPress:this.$t.__("WordPress",this.$td),serverInfo:this.$t.__("Server Info",this.$td),activeTheme:this.$t.__("Active Theme",this.$td),muPlugins:this.$t.__("Must-Use Plugins",this.$td),activePlugins:this.$t.__("Active Plugins",this.$td),inactivePlugins:this.$t.__("Inactive Plugins",this.$td),copied:this.$t.__("Copied!",this.$td)}}},computed:{copySystemStatusInfo(){return JSON.stringify(this.rootStore.aioseo.data.status)}},methods:{onCopy(){this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)},onError(){},downloadSystemStatusInfo(){const h=new Blob([JSON.stringify(this.rootStore.aioseo.data.status)],{type:"application/json"}),i=document.createElement("a");i.href=URL.createObjectURL(h),i.download=`aioseo-system-status-${U.now().toFormat("yyyy-MM-dd")}.json`,i.click(),URL.revokeObjectURL(i.href)},processEmailDebugInfo(){if(this.emailError=!1,!this.emailAddress||!/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(this.emailAddress)){this.emailError=!0;return}this.sendingEmail=!0,this.toolsStore.emailDebugInfo(this.emailAddress).then(()=>{this.emailAddress=null,this.sendingEmail=!1})}}},H={class:"aioseo-tools-system-status-info"},K={class:"actions"},Q={class:"aioseo-settings-row"},X={key:0,class:"settings-group"},Y={class:"settings-name"},Z={class:"name"},tt={class:"settings-content"},st={class:"system-status-table"};function et(h,i,ot,k,t,u){const I=e("svg-download"),_=e("base-button"),E=e("svg-copy"),D=e("svg-checkmark"),g=e("grid-column"),A=e("base-input"),$=e("grid-row"),y=e("table-column"),x=e("table-row"),T=e("core-card"),p=J("clipboard");return n(),r("div",H,[s(T,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:o(()=>[l("div",K,[s($,null,{default:o(()=>[s(g,{sm:"6",class:"left"},{default:o(()=>[s(_,{type:"blue",size:"small",onClick:u.downloadSystemStatusInfo},{default:o(()=>[s(I),c(" "+a(t.strings.downloadSystemInfoFile),1)]),_:1},8,["onClick"]),M((n(),v(_,{type:"blue",size:"small"},{default:o(()=>[t.copied?f("",!0):(n(),r(d,{key:0},[s(E),c(" "+a(t.strings.copyToClipboard),1)],64)),t.copied?(n(),r(d,{key:1},[s(D),c(" "+a(t.strings.copied),1)],64)):f("",!0)]),_:1})),[[p,u.copySystemStatusInfo,"copy"],[p,u.onCopy,"success"],[p,u.onError,"error"]])]),_:1}),s(g,{sm:"6",class:"right"},{default:o(()=>[s(A,{size:"small",placeholder:t.strings.emailDebugInformation,modelValue:t.emailAddress,"onUpdate:modelValue":i[0]||(i[0]=m=>t.emailAddress=m),class:w({"aioseo-error":t.emailError})},null,8,["placeholder","modelValue","class"]),s(_,{type:"blue",size:"small",onClick:u.processEmailDebugInfo,loading:t.sendingEmail},{default:o(()=>[c(a(t.strings.submit),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),l("div",Q,[(n(!0),r(d,null,C(k.rootStore.aioseo.data.status,(m,P)=>(n(),r(d,{key:P},[m.results.length?(n(),r("div",X,[l("div",Y,[l("div",Z,a(m.label),1)]),l("div",tt,[l("div",st,[(n(!0),r(d,null,C(m.results,(S,b)=>(n(),v(x,{key:b,class:w({even:b%2===0})},{default:o(()=>[s(y,{class:"system-status-header"},{default:o(()=>[c(a(S.header),1)]),_:2},1024),s(y,null,{default:o(()=>[c(a(S.value),1)]),_:2},1024)]),_:2},1032,["class"]))),128))])])])):f("",!0)],64))),128))])]),_:1},8,["header-text"])])}const St=q(W,[["render",et]]);export{St as default};
