import{a as N}from"./SchemaStore.e1c60a5d.js";import{S as B,H as P}from"./index.21ff19c6.js";import{C as j}from"./GoogleSearchPreview.bb846430.js";import{c as E}from"./Caret.cc16468c.js";import{T as G}from"./Slide.9bb3b45e.js";import{g as T,f as L,x as M,o as e,c as n,a as c,K as C,t as v,H,u as r,b as l,l as f,m as q,y as w,k as V,G as R,N as A}from"./runtime-dom.esm-bundler.c4caba60.js";import"./translations.d159963e.js";import{_ as p}from"./default-i18n.20001971.js";const z={class:"aioseo-seo-site-analysis-result"},F={class:"result-header"},U={class:"result-content"},D={class:"result-body"},K={key:0,class:"result-code"},J=["innerHTML"],Q={key:1,class:"result-code-alt"},W=["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:d}){const i=d,g=t,_=T(!1),k=L(()=>B.head(g.test,g.result)),s=L(()=>B.body(g.test,g.result));function h(){i("toggleActive")}return(O,m)=>{const y=M("base-button");return e(),n("div",z,[c("div",F,[c("span",{class:C(["result-status",t.result.status])},null,2),c("div",U,v(k.value),1),t.showInstructions||s.value.code||s.value.codeAlt?(e(),n("div",{key:0,class:C(["result-toggle",{active:t.activeRow}]),onClick:h},[H(r(E))],2)):l("",!0)]),t.showInstructions||s.value.code||s.value.codeAlt?(e(),f(r(G),{key:0,active:t.activeRow},{default:q(()=>[c("div",D,[s.value.code?(e(),n("div",K,[c("pre",null,[w("						"),c("code",{innerHTML:r(P)(s.value.code.trim())},null,8,J),w(`
					`)])])):l("",!0),s.value.codeAlt?(e(),n("div",Q,[c("pre",null,[w("						"),c("code",null,v(r(P)(s.value.codeAlt.trim())),1),w(`
					`)])])):l("",!0),s.value.message&&t.showInstructions?(e(),n("div",{key:2,class:"result-message",innerHTML:s.value.message},null,8,W)):l("",!0),s.value.buttonLink&&t.showInstructions?(e(),n("div",X,[H(y,{href:s.value.buttonLink,tag:"a",target:"_blank",type:"blue",size:"medium",loading:_.value},{default:q(()=>[w(v(s.value.buttonText),1)]),_:1},8,["href","loading"])])):l("",!0)])]),_:1},8,["active"])):l("",!0)])}}},Y={class:"aioseo-seo-site-analysis-results"},Z={key:1,class:"group-header"},x={key:2,class:"group-header"},ee={key:3,class:"group-header"},te={key:4,class:"group-header"},se={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 d="all-in-one-seo-pack",i=t,{parseTags:g}=N({separator:void 0}),_=T(""),k=T(""),s=T(null),h=L(()=>({basic:p("Basic SEO",d),advanced:p("Advanced SEO",d),performance:p("Performance SEO",d),security:p("Security SEO",d),noResults:p("No items found.",d)}));function O(){return Object.keys(i.allResults).every(a=>Object.keys(i.allResults[a]).length===0)}function m(a){return B.getFilteredResults(a,i.section)}function y(a){return Object.keys(m(i.allResults[a])).length}function b(a){if(s.value===a){s.value=null;return}s.value=a}return V(()=>{var a,$;if(($=(a=i.allResults)==null?void 0:a.advanced)!=null&&$.searchPreview&&i.site){const u=new URL(i.site);k.value=u.href,_.value=u.host}}),(a,$)=>(e(),n("div",Y,[t.showGooglePreview?(e(),f(r(j),{key:0,hostname:_.value,url:k.value,title:r(g)(t.allResults.basic.title.value),description:r(g)(t.allResults.basic.description.value)},null,8,["hostname","url","title","description"])):l("",!0),y("basic")?(e(),n("div",Z,v(h.value.basic),1)):l("",!0),(e(!0),n(R,null,A(m(t.allResults.basic),(u,o)=>(e(),f(r(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":s.value===`basic-${o}`,onToggleActive:I=>b(`basic-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),y("advanced")?(e(),n("div",x,v(h.value.advanced),1)):l("",!0),(e(!0),n(R,null,A(m(t.allResults.advanced),(u,o)=>(e(),f(r(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":s.value===`advanced-${o}`,onToggleActive:I=>b(`advanced-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),y("performance")?(e(),n("div",ee,v(h.value.performance),1)):l("",!0),(e(!0),n(R,null,A(m(t.allResults.performance),(u,o)=>(e(),f(r(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":s.value===`performance-${o}`,onToggleActive:I=>b(`performance-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),y("security")?(e(),n("div",te,v(h.value.security),1)):l("",!0),(e(!0),n(R,null,A(m(t.allResults.security),(u,o)=>(e(),f(r(S),{key:o,test:o,result:u,"show-instructions":t.showInstructions,"active-row":s.value===`security-${o}`,onToggleActive:I=>b(`security-${o}`)},null,8,["test","result","show-instructions","active-row","onToggleActive"]))),128)),O()?(e(),n("div",se,v(h.value.noResults),1)):l("",!0)]))}},de=""+window.__aioseoDynamicImportPreload__("images/iphone-frame.f087d3d9.png");export{ve as _,de as i};
