import{u as R,o as U,D as V}from"./links.bbde6535.js";import{C as z}from"./Card.3bd391bc.js";import{G as N,a as B}from"./Row.16199427.js";import{S as F}from"./Checkmark.85e83e8c.js";import{c as O}from"./index.fadde3df.js";import{S as j}from"./Download.1d6c4d94.js";import{T as G,a as M}from"./Row.9df1361a.js";import{x as e,O as J,c as r,z as s,l as o,o as n,a,A as m,t as l,L as H,k as C,H as d,b as f,E as g,I}from"./vue.runtime.esm-bundler.308f2021.js";import{_ as W}from"./_plugin-vue_export-helper.5bcc150c.js";import"./default-i18n.3881921e.js";import"./isArrayLikeObject.965a2149.js";import"./Tooltip.432f1167.js";import"./Caret.baea7fe0.js";import"./Slide.22dc72dc.js";const q={setup(){return{rootStore:R(),toolsStore:U()}},components:{CoreCard:z,GridColumn:N,GridRow:B,SvgCheckmark:F,SvgCopy:O,SvgDownload:j,TableColumn:G,TableRow:M},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 y=new Blob([JSON.stringify(this.rootStore.aioseo.data.status)],{type:"application/json"}),i=document.createElement("a");i.href=URL.createObjectURL(y),i.download=`aioseo-system-status-${V.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})}}},K={class:"aioseo-tools-system-status-info"},Q={class:"actions"},X={class:"aioseo-settings-row"},Y={class:"settings-name"},Z={class:"name"},tt={class:"settings-content"},st={class:"system-status-table"},et=["title"];function ot(y,i,nt,E,t,c){const A=e("svg-download"),_=e("base-button"),D=e("svg-copy"),$=e("svg-checkmark"),S=e("grid-column"),x=e("base-input"),T=e("grid-row"),b=e("table-column"),P=e("table-row"),L=e("core-card"),p=J("clipboard");return n(),r("div",K,[s(L,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:o(()=>[a("div",Q,[s(T,null,{default:o(()=>[s(S,{sm:"6",class:"left"},{default:o(()=>[s(_,{type:"blue",size:"small",onClick:c.downloadSystemStatusInfo},{default:o(()=>[s(A),m(" "+l(t.strings.downloadSystemInfoFile),1)]),_:1},8,["onClick"]),H((n(),C(_,{type:"blue",size:"small"},{default:o(()=>[t.copied?f("",!0):(n(),r(d,{key:0},[s(D),m(" "+l(t.strings.copyToClipboard),1)],64)),t.copied?(n(),r(d,{key:1},[s($),m(" "+l(t.strings.copied),1)],64)):f("",!0)]),_:1})),[[p,c.copySystemStatusInfo,"copy"],[p,c.onCopy,"success"],[p,c.onError,"error"]])]),_:1}),s(S,{sm:"6",class:"right"},{default:o(()=>[s(x,{size:"small",placeholder:t.strings.emailDebugInformation,modelValue:t.emailAddress,"onUpdate:modelValue":i[0]||(i[0]=u=>t.emailAddress=u),class:g({"aioseo-error":t.emailError})},null,8,["placeholder","modelValue","class"]),s(_,{type:"blue",size:"small",onClick:c.processEmailDebugInfo,loading:t.sendingEmail},{default:o(()=>[m(l(t.strings.submit),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),a("div",X,[(n(!0),r(d,null,I(E.rootStore.aioseo.data.status,(u,v)=>{var w;return n(),r(d,{key:v},[(w=u.results)!=null&&w.length?(n(),r("div",{key:0,class:g(["settings-group",["settings-group--"+v]])},[a("div",Y,[a("div",Z,l(u.label),1)]),a("div",tt,[a("div",st,[(n(!0),r(d,null,I(u.results,(h,k)=>(n(),C(P,{key:k,class:g({even:k%2===0})},{default:o(()=>[s(b,{class:"system-status-header"},{default:o(()=>[a("span",{title:h.header},l(h.header),9,et)]),_:2},1024),s(b,null,{default:o(()=>[m(l(h.value),1)]),_:2},1024)]),_:2},1032,["class"]))),128))])])],2)):f("",!0)],64)}),128))])]),_:1},8,["header-text"])])}const St=W(q,[["render",ot]]);export{St as default};
