import{D as P}from"./index.4dbecc01.js";import{b as L}from"./vuex.esm-bundler.55d3d5b3.js";import{C as N}from"./Card.0a3b54f8.js";import{G as R,a as U}from"./Row.d42459be.js";import{S as V}from"./Checkmark.36fbf255.js";import{a as B}from"./index.fae5bbc8.js";import{S as F}from"./Download.84d4c983.js";import{T as z,a as j}from"./Row.c645727c.js";import{_ as G,r as e,N as O,c as a,d as s,w as o,o as n,a as l,y as c,t as r,H as M,b as S,F as d,f as h,B as w,G as C}from"./_plugin-vue_export-helper.a81c6319.js";import"./default-i18n.0e8bc810.js";import"./_commonjsHelpers.f84db168.js";import"./helpers.51e5fd9c.js";import"./Tooltip.c4cc47a2.js";import"./Caret.19bf2275.js";import"./Slide.4392623f.js";const J={components:{CoreCard:N,GridColumn:R,GridRow:U,SvgCheckmark:V,SvgCopy:B,SvgDownload:F,TableColumn:z,TableRow:j},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.$aioseo.data.status)}},methods:{...L(["emailDebugInfo"]),onCopy(){this.copied=!0,setTimeout(()=>{this.copied=!1},2e3)},onError(){},downloadSystemStatusInfo(){const _=new Blob([JSON.stringify(this.$aioseo.data.status)],{type:"application/json"}),i=document.createElement("a");i.href=URL.createObjectURL(_),i.download=`aioseo-system-status-${P.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.emailDebugInfo(this.emailAddress).then(()=>{this.emailAddress=null,this.sendingEmail=!1})}}},H={class:"aioseo-tools-system-status-info"},W={class:"actions"},q={class:"aioseo-settings-row"},K={key:0,class:"settings-group"},Q={class:"settings-name"},X={class:"name"},Y={class:"settings-content"},Z={class:"system-status-table"};function tt(_,i,st,et,t,m){const k=e("svg-download"),p=e("base-button"),I=e("svg-copy"),$=e("svg-checkmark"),g=e("grid-column"),E=e("base-input"),D=e("grid-row"),y=e("table-column"),A=e("table-row"),T=e("core-card"),f=O("clipboard");return n(),a("div",H,[s(T,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:o(()=>[l("div",W,[s(D,null,{default:o(()=>[s(g,{sm:"6",class:"left"},{default:o(()=>[s(p,{type:"blue",size:"small",onClick:m.downloadSystemStatusInfo},{default:o(()=>[s(k),c(" "+r(t.strings.downloadSystemInfoFile),1)]),_:1},8,["onClick"]),M((n(),S(p,{type:"blue",size:"small"},{default:o(()=>[t.copied?h("",!0):(n(),a(d,{key:0},[s(I),c(" "+r(t.strings.copyToClipboard),1)],64)),t.copied?(n(),a(d,{key:1},[s($),c(" "+r(t.strings.copied),1)],64)):h("",!0)]),_:1})),[[f,m.copySystemStatusInfo,"copy"],[f,m.onCopy,"success"],[f,m.onError,"error"]])]),_:1}),s(g,{sm:"6",class:"right"},{default:o(()=>[s(E,{size:"small",placeholder:t.strings.emailDebugInformation,modelValue:t.emailAddress,"onUpdate:modelValue":i[0]||(i[0]=u=>t.emailAddress=u),class:w({"aioseo-error":t.emailError})},null,8,["placeholder","modelValue","class"]),s(p,{type:"blue",size:"small",onClick:m.processEmailDebugInfo,loading:t.sendingEmail},{default:o(()=>[c(r(t.strings.submit),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),l("div",q,[(n(!0),a(d,null,C(_.$aioseo.data.status,(u,x)=>(n(),a(d,{key:x},[u.results.length?(n(),a("div",K,[l("div",Q,[l("div",X,r(u.label),1)]),l("div",Y,[l("div",Z,[(n(!0),a(d,null,C(u.results,(b,v)=>(n(),S(A,{key:v,class:w({even:v%2===0})},{default:o(()=>[s(y,{class:"system-status-header"},{default:o(()=>[c(r(b.header),1)]),_:2},1024),s(y,null,{default:o(()=>[c(r(b.value),1)]),_:2},1024)]),_:2},1032,["class"]))),128))])])])):h("",!0)],64))),128))])]),_:1},8,["header-text"])])}const yt=G(J,[["render",tt]]);export{yt as default};
