import{a as H,a6 as L,a5 as P,D as N}from"./index.e0fdfdc6.js";import{C as E}from"./GoogleSearchPreview.bbe31655.js";import{S as M}from"./Caret.cd869c5d.js";import{T as F}from"./Slide.3003ef51.js";import{Y as T,W as O,a6 as G,o as e,c as n,_ as v,ae as C,$ as d,l as q,R as l,a4 as r,a1 as f,a2 as j,a7 as p,f as V,F as b,af as A}from"./runtime-core.esm-bundler.ce5add0b.js";import"./translations.5e539ab1.js";import{_}from"./default-i18n.368c2d5c.js";const z={class:"aioseo-seo-site-analysis-result"},D={class:"result-header"},U={class:"result-content"},W={class:"result-body"},Y={key:0,class:"result-code"},J=["innerHTML"],K={key:1,class:"result-code-alt"},Q=["innerHTML"],X={key:3,class:"result-action"},S={__name:"SeoSiteAnalysisResult",props:{test:{type:String,required:!0},result:{type:Object,required:!0},showInstructions:{type:Boolean,required:!1},activeRow:{type:Boolean,required:!1}},emits:["toggleActive"],setup(t,{emit:g}){const i=H(),k=g,h=t,R=T(!1),c=O(()=>L.head(h.test,h.result)),s=O(()=>L.body(h.test,h.result));function $(){k("toggleActive")}return(m,w)=>{const y=G("base-button");return e(),n("div",z,[v("div",D,[v("span",{class:C(["result-status",t.result.status])},null,2),v("div",U,d(c.value),1),t.showInstructions||s.value.code||s.value.codeAlt?(e(),n("div",{key:0,class:C(["result-toggle",{active:t.activeRow}]),onClick:$},[q(l(M))],2)):r("",!0)]),t.showInstructions||s.value.code||s.value.codeAlt?(e(),f(l(F),{key:0,active:t.activeRow},{default:j(()=>{var a;return[v("div",W,[s.value.code?(e(),n("div",Y,[v("pre",null,[p("						"),v("code",{innerHTML:l(P)(s.value.code.trim())},null,8,J),p(`
					`)])])):r("",!0),s.value.codeAlt?(e(),n("div",K,[v("pre",null,[p("						"),v("code",null,d(l(P)(s.value.codeAlt.trim())),1),p(`
					`)])])):r("",!0),s.value.message&&t.showInstructions?(e(),n("div",{key:2,class:"result-message",innerHTML:s.value.message},null,8,Q)):r("",!0),s.value.buttonLink&&t.showInstructions&&((a=l(i).aioseo.user.capabilities)!=null&&a.edit_pages)?(e(),n("div",X,[q(y,{href:s.value.buttonLink,tag:"a",target:"_blank",type:"blue",size:"medium",loading:R.value},{default:j(()=>[p(d(s.value.buttonText),1)]),_:1},8,["href","loading"])])):r("",!0)])]}),_:1},8,["active"])):r("",!0)])}}},Z={class:"aioseo-seo-site-analysis-results"},x={key:1,class:"group-header"},ee={key:2,class:"group-header"},te={key:3,class:"group-header"},se={key:4,class:"group-header"},oe={key:5,class:"no-results"},ve={__name:"SeoSiteAnalysisResults",props:{section:{type:String,required:!0},allResults:{type:Object,required:!0},site:{type:String,required:!1},showGooglePreview:Boolean,showInstructions:Boolean},setup(t){const g="all-in-one-seo-pack",i=t,{parseTags:k}=N({separator:void 0}),h=T(""),R=T(""),c=T(null),s=O(()=>({basic:_("Basic SEO",g),advanced:_("Advanced SEO",g),performance:_("Performance SEO",g),security:_("Security SEO",g),noResults:_("No items found.",g)}));function $(){return Object.keys(i.allResults).every(a=>Object.keys(i.allResults[a]).length===0)}function m(a){return L.getFilteredResults(a,i.section)}function w(a){return Object.keys(m(i.allResults[a])).length}function y(a){if(c.value===a){c.value=null;return}c.value=a}return V(()=>{var a,I;if((I=(a=i.allResults)==null?void 0:a.advanced)!=null&&I.searchPreview&&i.site){const u=new URL(i.site);R.value=u.href,h.value=u.host}}),(a,I)=>(e(),n("div",Z,[t.showGooglePreview?(e(),f(l(E),{key:0,hostname:h.value,url:R.value,title:l(k)(t.allResults.basic.title.value),description:l(k)(t.allResults.basic.description.value)},null,8,["hostname","url","title","description"])):r("",!0),w("basic")?(e(),n("div",x,d(s.value.basic),1)):r("",!0),(e(!0),n(b,null,A(m(t.allResults.basic),(u,o)=>(e(),f(l(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":c.value===`basic-${o}`,onToggleActive:B=>y(`basic-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),w("advanced")?(e(),n("div",ee,d(s.value.advanced),1)):r("",!0),(e(!0),n(b,null,A(m(t.allResults.advanced),(u,o)=>(e(),f(l(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":c.value===`advanced-${o}`,onToggleActive:B=>y(`advanced-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),w("performance")?(e(),n("div",te,d(s.value.performance),1)):r("",!0),(e(!0),n(b,null,A(m(t.allResults.performance),(u,o)=>(e(),f(l(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":c.value===`performance-${o}`,onToggleActive:B=>y(`performance-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),w("security")?(e(),n("div",se,d(s.value.security),1)):r("",!0),(e(!0),n(b,null,A(m(t.allResults.security),(u,o)=>(e(),f(l(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":c.value===`security-${o}`,onToggleActive:B=>y(`security-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),$()?(e(),n("div",oe,d(s.value.noResults),1)):r("",!0)]))}},de=""+window.__aioseoDynamicImportPreload__("images/iphone-frame.f087d3d9.png");export{ve as _,de as i};
