import{u as N,a3 as L,a4 as P,A as j}from"./index.bd66e758.js";import{C as E}from"./GoogleSearchPreview.d0cab464.js";import{c as G}from"./Caret.382b7591.js";import{T as M}from"./Slide.a525748d.js";import{g as T,f as O,x as V,o as e,c as n,a as v,K as C,t as d,H as q,u as l,b as r,l as f,m as H,y as p,k as z,G as R,N as A}from"./runtime-dom.esm-bundler.5d5e6b71.js";import"./translations.d159963e.js";import{_}from"./default-i18n.20001971.js";const F={class:"aioseo-seo-site-analysis-result"},U={class:"result-header"},D={class:"result-content"},K={class:"result-body"},J={key:0,class:"result-code"},Q=["innerHTML"],W={key:1,class:"result-code-alt"},X=["innerHTML"],Y={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=N(),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=V("base-button");return e(),n("div",F,[v("div",U,[v("span",{class:C(["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:C(["result-toggle",{active:t.activeRow}]),onClick:$},[q(l(G))],2)):r("",!0)]),t.showInstructions||s.value.code||s.value.codeAlt?(e(),f(l(M),{key:0,active:t.activeRow},{default:H(()=>{var a;return[v("div",K,[s.value.code?(e(),n("div",J,[v("pre",null,[p("						"),v("code",{innerHTML:l(P)(s.value.code.trim())},null,8,Q),p(`
					`)])])):r("",!0),s.value.codeAlt?(e(),n("div",W,[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,X)):r("",!0),s.value.buttonLink&&t.showInstructions&&((a=l(i).aioseo.user.data.allcaps)!=null&&a.edit_pages)?(e(),n("div",Y,[q(y,{href:s.value.buttonLink,tag:"a",target:"_blank",type:"blue",size:"medium",loading:b.value},{default:H(()=>[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}=j({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 z(()=>{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",Z,[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};
