import{G as z}from"./constants.fe8bda37.js";import{p as k,j as L,e as x,u as H,b as w}from"./index.bd66e758.js";import{C as S}from"./Card.88a70537.js";import{_ as N}from"./Analyze.a9cf9064.js";import{C as B}from"./Tooltip.418c677c.js";import{u as D}from"./vue-router.ad00dfec.js";import{C as O}from"./Tabs.38c9ba5c.js";import{d as M}from"./Caret.382b7591.js";import{_ as $}from"./iphone-frame.ba9c1450.js";import{g as E}from"./utils.55c82852.js";import"./translations.d159963e.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import{g as T,f as A,u as t,o as n,c as h,H as s,l as y,m as a,a as f,K as G,v as q,t as g,b,x as I,y as U}from"./runtime-dom.esm-bundler.5d5e6b71.js";import{_ as v}from"./default-i18n.20001971.js";import{S as j}from"./Refresh.f1edec25.js";import{S as K}from"./index.eb92a2a8.js";import"./helpers.bf0d86e6.js";import"./Slide.a525748d.js";import"./popup.92105c51.js";import"./params.af7ed354.js";import"./SeoSiteScore.12437843.js";import"./Blur.4fe4b9a3.js";import"./DonutChart.d528c6ed.js";import"./AnimatedNumber.cc7d07cd.js";import"./numbers.9fc174f3.js";import"./Index.3aa1039e.js";import"./Loading.28c36947.js";import"./Book.a4f504a3.js";import"./Lab.377f83d0.js";import"./ConnectStore.3c011ea9.js";import"./SetupWizardStore.4b9e88e8.js";import"./ProBadge.aeac9858.js";import"./Information.3b2ed489.js";import"./GoogleSearchPreview.d0cab464.js";import"./Url.47c8a1c7.js";const P={key:0,class:"loading-container"},Q={key:1},F={class:"label"},J={key:2},W={__name:"HomepageAuditTabList",setup(R){const l="all-in-one-seo-pack",e=k(),c=D(),u=T(!1),i=A(()=>{var C;const r=E({error:e.homeResults.score?e.criticalCount("homepage"):0,warning:e.homeResults.score?e.recommendedCount("homepage"):0,good:e.homeResults.score?e.goodCount("homepage"):0}).filter(_=>0<_.analyze.count),o=(C=c==null?void 0:c.query)==null?void 0:C.tab;return o&&r.find(_=>_.slug===o)?e.changeHomepageAuditTab(o):r.length&&e.changeHomepageAuditTab(r[0].slug),r}),m={noResults:v("No results found.",l)};function p(d){u.value||(u.value=!0,e.changeHomepageAuditTab(d),setTimeout(()=>{u.value=!1},50))}return(d,r)=>t(e).analyzing?(n(),h("div",P,[s(t(M),{dark:""})])):(n(),h("div",Q,[i.value.length?(n(),y(t(O),{key:0,tabs:i.value,showSaveButton:!1,active:t(e).homepageAudit.activeTab,internal:"",onChanged:p,"skinny-tabs":""},{"var-tab":a(({tab:o})=>[f("span",{class:G(["icon",o.analyze.classColor])},[(n(),y(q(o.icon)))],2),f("span",F,g(o.label)+" ("+g(o.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):b("",!0),t(e).homeResults.results&&i.value.length?(n(),y(t($),{key:1,section:t(e).homepageAudit.activeTab,"all-results":t(e).homeResults.results,"show-instructions":""},null,8,["section","all-results"])):b("",!0),i.value.length?b("",!0):(n(),h("div",J,[f("span",null,g(m.noResults),1)]))]))}},X=V(W,[["__scopeId","data-v-db3edc20"]]),Y={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],Oe={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=k(),c=L(),u=x(),i=H(),m=T(!1),p={completeSeoChecklist:v("Complete SEO Checklist",l),refreshResults:v("Refresh Results",l),cardDescription:v("These are the results our SEO Analzyer has generated after analyzing the homepage of your website.",l)+" "+w.getDocLink(z.learnMore,"seoAnalyzer",!0)},d=A(()=>!c.isUnlicensed||i.aioseo.data.isNetworkLicensed);async function r(){m.value=!0,await e.runSiteAnalyzer({refresh:!0}),m.value=!1}return(o,C)=>{const _=I("base-button");return n(),h("div",Y,[s(t(S),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[s(t(N))]),_:1}),(d.value||t(u).internalOptions.internal.siteAnalysis.connectToken)&&!t(e).analyzeError&&t(e).homeResults.score&&!t(e).analyzing?(n(),y(t(S),{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:a(()=>[f("span",null,g(p.completeSeoChecklist),1),s(t(B),null,{tooltip:a(()=>[f("span",{innerHTML:p.cardDescription},null,8,Z)]),default:a(()=>[s(t(K))]),_:1})]),"header-extra":a(()=>[s(_,{class:"refresh-results",type:"gray",size:"small",onClick:r,loading:m.value},{default:a(()=>[s(t(j)),U(" "+g(p.refreshResults),1)]),_:1},8,["loading"])]),default:a(()=>[s(t(X))]),_:1})):b("",!0)])}}};export{Oe as default};
