import{a as H,ab as L,aa as P,F as N}from"./index.4b887428.js";import{C as E}from"./GoogleSearchPreview.ea4e7828.js";import{S as F}from"./Caret.cd869c5d.js";import{T as M}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 R,af as A}from"./runtime-core.esm-bundler.ce5add0b.js";import"./translations.e71e2202.js";import{_}from"./default-i18n.65d58dd6.js";const z={class:"aioseo-seo-site-analysis-result"},U={class:"result-header"},D={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(),b=g,h=t,k=T(!1),c=O(()=>L.head(h.test,h.result)),s=O(()=>L.body(h.test,h.result));function $(){b("toggleActive")}return(m,w)=>{const y=G("base-button");return e(),n("div",z,[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(F))],2)):r("",!0)]),t.showInstructions||s.value.code||s.value.codeAlt?(e(),f(l(M),{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:k.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:b}=N({separator:void 0}),h=T(""),k=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);k.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:k.value,title:l(b)(t.allResults.basic.title.value),description:l(b)(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};
