import{D as P}from"./index.02a5ed9a.js";import{m as L}from"./vuex.esm-bundler.8589b2dd.js";import{C as R}from"./Card.24f1a534.js";import{G as U,a as V}from"./Row.5e452de4.js";import{S as F}from"./Checkmark.c5326878.js";import{g as N}from"./index.fd0fcee8.js";import{S as z}from"./Download.8079e8d1.js";import{T as B,a as j}from"./Row.6ff2e5ee.js";import{_ as O,c as a,d as s,w as e,r as o,X as G,o as n,f as l,e as c,t as r,q as M,h as S,F as d,a as h,n as w,i as C}from"./_plugin-vue_export-helper.2d9794a3.js";import"./isArrayLikeObject.c492f682.js";import"./default-i18n.ab92175e.js";import"./_commonjsHelpers.f84db168.js";import"./helpers.de7566d0.js";import"./Tooltip.ae0bcccb.js";import"./Caret.42a820e0.js";import"./Slide.cd756e61.js";const J={components:{CoreCard:R,GridColumn:U,GridRow:V,SvgCheckmark:F,SvgCopy:N,SvgDownload:z,TableColumn:B,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})}}},q={class:"aioseo-tools-system-status-info"},W={class:"actions"},X={class:"aioseo-settings-row"},H={key:0,class:"settings-group"},K={class:"settings-name"},Q={class:"name"},Y={class:"settings-content"},Z={class:"system-status-table"};function tt(_,i,st,et,t,m){const k=o("svg-download"),p=o("base-button"),I=o("svg-copy"),$=o("svg-checkmark"),g=o("grid-column"),E=o("base-input"),D=o("grid-row"),y=o("table-column"),A=o("table-row"),T=o("core-card"),f=G("clipboard");return n(),a("div",q,[s(T,{slug:"systemStatusInfo","header-text":t.strings.systemStatusInfo},{default:e(()=>[l("div",W,[s(D,null,{default:e(()=>[s(g,{sm:"6",class:"left"},{default:e(()=>[s(p,{type:"blue",size:"small",onClick:m.downloadSystemStatusInfo},{default:e(()=>[s(k),c(" "+r(t.strings.downloadSystemInfoFile),1)]),_:1},8,["onClick"]),M((n(),S(p,{type:"blue",size:"small"},{default:e(()=>[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:e(()=>[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:e(()=>[c(r(t.strings.submit),1)]),_:1},8,["onClick","loading"])]),_:1})]),_:1})]),l("div",X,[(n(!0),a(d,null,C(_.$aioseo.data.status,(u,x)=>(n(),a(d,{key:x},[u.results.length?(n(),a("div",H,[l("div",K,[l("div",Q,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:e(()=>[s(y,{class:"system-status-header"},{default:e(()=>[c(r(b.header),1)]),_:2},1024),s(y,null,{default:e(()=>[c(r(b.value),1)]),_:2},1024)]),_:2},1032,["class"]))),128))])])])):h("",!0)],64))),128))])]),_:1},8,["header-text"])])}const bt=O(J,[["render",tt]]);export{bt as default};
