import{u as R,p as L,D as U}from"./links.4e9269a4.js";import{C as V}from"./Card.37225977.js";import{G as F,a as N}from"./Row.1358a527.js";import{S as z}from"./Checkmark.20d31f86.js";import{c as B}from"./index.cd7fac8b.js";import{S as j}from"./Download.fabe51d5.js";import{T as O,a as G}from"./Row.f1164273.js";import{r as e,P as J,c as r,d as s,w as o,o as n,a as l,g as c,t as a,J as M,b as v,F as d,f,n as w,h as C}from"./vue.runtime.esm-bundler.1bf81f69.js";import{_ as W}from"./_plugin-vue_export-helper.4292a25a.js";import"./default-i18n.41786823.js";import"./isArrayLikeObject.76f0d098.js";import"./Tooltip.fc81232d.js";import"./Caret.0b57d359.js";import"./Slide.c4e68d01.js";/* empty css                                            */const q={setup(){return{rootStore:R(),toolsStore:L()}},components:{CoreCard:V,GridColumn:F,GridRow:N,SvgCheckmark:z,SvgCopy:B,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"),T=e("table-row"),x=e("core-card"),p=J("clipboard");return n(),r("div",H,[s(x,{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(T,{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=W(q,[["render",et]]);export{St as default};
