import{a as H,a4 as L,a5 as C,C as N}from"./index.ed1fc0db.js";import{C as E}from"./GoogleSearchPreview.9c280f08.js";import{S as M}from"./Caret.b694929e.js";import{T as F}from"./Slide.3e3dec13.js";import{Z as T,X as O,a6 as G,o as e,c as n,a as v,ae as P,$ as d,m as q,T as l,a4 as r,a1 as f,a2 as j,a7 as p,g as V,F as R,af as A}from"./runtime-core.esm-bundler.4f558f23.js";import"./translations.d159963e.js";import{_}from"./default-i18n.20001971.js";const z={class:"aioseo-seo-site-analysis-result"},U={class:"result-header"},D={class:"result-content"},X={class:"result-body"},Z={key:0,class:"result-code"},J=["innerHTML"],K={key:1,class:"result-code-alt"},Q=["innerHTML"],W={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,b=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",U,[v("span",{class:P(["result-status",t.result.status])},null,2),v("div",D,d(c.value),1),t.showInstructions||s.value.code||s.value.codeAlt?(e(),n("div",{key:0,class:P(["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",X,[s.value.code?(e(),n("div",Z,[v("pre",null,[p("						"),v("code",{innerHTML:l(C)(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(C)(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",W,[q(y,{href:s.value.buttonLink,tag:"a",target:"_blank",type:"blue",size:"medium",loading:b.value},{default:j(()=>[p(d(s.value.buttonText),1)]),_:1},8,["href","loading"])])):r("",!0)])]}),_:1},8,["active"])):r("",!0)])}}},Y={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(""),b=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);b.value=u.href,h.value=u.host}}),(a,I)=>(e(),n("div",Y,[t.showGooglePreview?(e(),f(l(E),{key:0,hostname:h.value,url:b.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(R,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(R,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(R,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(R,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};
