import{u as U,w as L,D as V}from"./links.Byq_3x2e.js";import{C as B}from"./Card.D52fee8h.js";import{G as F,a as N}from"./Row.DRnp1mVs.js";import{S as z}from"./Checkmark.DOG99yeO.js";import{c as j}from"./index.Dbgw3oZ8.js";import{S as G}from"./Download.CmT4-Qbo.js";import{T as M,a as O}from"./Row.ClzcKm5C.js";import{_ as J}from"./_plugin-vue_export-helper.BN1snXvA.js";import{v as e,U as W,c as r,B as s,l as o,o as n,a,C as u,t as l,M as q,k,F as d,b as f,G as g,J as I}from"./runtime-dom.esm-bundler.tPRhSV4q.js";import"./default-i18n.DXRQgkn2.js";import"./helpers.CXsRrhc8.js";import"./Tooltip.DhkkBQWW.js";import"./Caret.Ke5gylGO.js";import"./Slide.fjAuzpC8.js";const H={setup(){return{rootStore:U(),toolsStore:L()}},components:{CoreCard:B,GridColumn:F,GridRow:N,SvgCheckmark:z,SvgCopy:j,SvgDownload:G,TableColumn:M,TableRow:O},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 D=e("svg-download"),_=e("base-button"),A=e("svg-copy"),$=e("svg-checkmark"),b=e("grid-column"),T=e("base-input"),x=e("grid-row"),S=e("table-column"),P=e("table-row"),R=e("core-card"),p=W("clipboard");return n(),r("div",K,[s(R,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:o(()=>[a("div",Q,[s(x,null,{default:o(()=>[s(b,{sm:"6",class:"left"},{default:o(()=>[s(_,{type:"blue",size:"small",onClick:c.downloadSystemStatusInfo},{default:o(()=>[s(D),u(" "+l(t.strings.downloadSystemInfoFile),1)]),_:1},8,["onClick"]),q((n(),k(_,{type:"blue",size:"small"},{default:o(()=>[t.copied?f("",!0):(n(),r(d,{key:0},[s(A),u(" "+l(t.strings.copyToClipboard),1)],64)),t.copied?(n(),r(d,{key:1},[s($),u(" "+l(t.strings.copied),1)],64)):f("",!0)]),_:1})),[[p,c.copySystemStatusInfo,"copy"],[p,c.onCopy,"success"],[p,c.onError,"error"]])]),_:1}),s(b,{sm:"6",class:"right"},{default:o(()=>[s(T,{size:"small",placeholder:t.strings.emailDebugInformation,modelValue:t.emailAddress,"onUpdate:modelValue":i[0]||(i[0]=m=>t.emailAddress=m),class:g({"aioseo-error":t.emailError})},null,8,["placeholder","modelValue","class"]),s(_,{type:"blue",size:"small",onClick:c.processEmailDebugInfo,loading:t.sendingEmail},{default:o(()=>[u(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,(m,v)=>{var w;return n(),r(d,{key:v},[(w=m.results)!=null&&w.length?(n(),r("div",{key:0,class:g(["settings-group",["settings-group--"+v]])},[a("div",Y,[a("div",Z,l(m.label),1)]),a("div",tt,[a("div",st,[(n(!0),r(d,null,I(m.results,(h,C)=>(n(),k(P,{key:C,class:g({even:C%2===0})},{default:o(()=>[s(S,{class:"system-status-header"},{default:o(()=>[a("span",{title:h.header},l(h.header),9,et)]),_:2},1024),s(S,null,{default:o(()=>[u(l(h.value),1)]),_:2},1024)]),_:2},1032,["class"]))),128))])])],2)):f("",!0)],64)}),128))])]),_:1},8,["header-text"])])}const bt=J(H,[["render",ot]]);export{bt as default};
