import{u as R,o as L,D as U}from"./links.23796d97.js";import{C as V}from"./Card.79fe964d.js";import{G as F,a as N}from"./Row.5242dafa.js";import{S as z}from"./Checkmark.e0bb6305.js";import{c as B}from"./index.0eabb636.js";import{S as j}from"./Download.dd43afca.js";import{T as O,a as G}from"./Row.d3be1f0a.js";import{r as e,Q as M,c as r,d as s,w as o,o as n,a as l,g as c,t as a,K as J,b as v,F as d,f,n as w,h as C}from"./vue.runtime.esm-bundler.b39e1078.js";import{_ as K}from"./_plugin-vue_export-helper.b97bdf23.js";import"./default-i18n.3881921e.js";import"./isArrayLikeObject.22a096cb.js";import"./Tooltip.6979830f.js";import"./Caret.164d8058.js";import"./Slide.cdf6c622.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})}}},W={class:"aioseo-tools-system-status-info"},q={class:"actions"},H={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=M("clipboard");return n(),r("div",W,[s(x,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:o(()=>[l("div",q,[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"]),J((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",H,[(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=K(Q,[["render",et]]);export{St as default};
