import{G as z}from"./constants.41876895.js";import{t as k,j as L,a as x,b as w,c as H}from"./index.6205915e.js";import{C as S}from"./Card.1db76325.js";import{_ as N}from"./Analyze.5089c4c6.js";import{C as B}from"./Tooltip.e5a30815.js";import{u as D}from"./vue-router.d5648d95.js";import{C as O}from"./Tabs.c595cb5a.js";import{C as $}from"./Button.898cae57.js";import{_ as M}from"./iphone-frame.5f1a5476.js";import{g as E}from"./utils.8b91fbf4.js";import"./translations.e71e2202.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import{a1 as T,$ as A,u as t,o as n,a3 as h,q as s,c as y,w as a,a4 as f,ae as q,r as G,t as g,b,a7 as I,a as U}from"./runtime-core.esm-bundler.50cb9e6d.js";import{_ as v}from"./default-i18n.65d58dd6.js";import{S as j}from"./Refresh.49ba0458.js";import{S as P}from"./Trash.544ebd43.js";import"./helpers.7981a424.js";import"./Caret.19d3d4d0.js";import"./Close.650e0e8f.js";import"./Slide.25bc4286.js";import"./runtime-dom.esm-bundler.36191dca.js";import"./SeoSiteScore.13fd3035.js";import"./Blur.73468424.js";import"./DonutChart.72b027fd.js";import"./AnimatedNumber.1915c79b.js";import"./numbers.cdba2587.js";import"./Index.7d1eb916.js";import"./Index.d517260b.js";import"./Loading.80cd60d2.js";import"./Book.e78c9ce0.js";import"./Lab.5125a4e1.js";import"./ProBadge.3bfca56c.js";import"./Information.2306f29d.js";import"./GoogleSearchPreview.3c490476.js";import"./Url.7104ea0a.js";import"./Pencil.1f4e936a.js";const Q={key:0,class:"loading-container"},F={key:1},J={class:"label"},K={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",Q,[s(t($),{dark:""})])):(n(),h("div",F,[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:q(["icon",o.analyze.classColor])},[(n(),y(G(o.icon)))],2),f("span",J,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(M),{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",K,[f("span",null,g(m.noResults),1)]))]))}},X=V(W,[["__scopeId","data-v-db3edc20"]]),Y={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],$e={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=k(),c=L(),u=x(),i=w(),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)+" "+H.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(P))]),_: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{$e as default};
