import{G as z}from"./constants.fe8bda37.js";import{q as k,g as L,c as x,a as H,l as w}from"./index.ed1fc0db.js";import{C as S}from"./Card.17b56f9a.js";import{_ as N}from"./Analyze.7ac15f41.js";import{C as B}from"./Tooltip.447e44bb.js";import{u as D}from"./vue-router.97a610ed.js";import{C as O}from"./Tabs.fefb55da.js";import{C as $}from"./Button.e237bb50.js";import{_ as M}from"./iphone-frame.d837f811.js";import{g as E}from"./utils.53e2e8da.js";import"./translations.d159963e.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import{Z as T,X as A,T as o,o as n,c as h,m as s,a1 as y,a2 as a,a as f,ae as q,a5 as G,$ as g,a4 as v,a6 as I,a7 as U}from"./runtime-core.esm-bundler.4f558f23.js";import{_ as C}from"./default-i18n.20001971.js";import{S as P}from"./Refresh.1ce2962b.js";import{S as Q}from"./Trash.263ee9c7.js";import"./helpers.2a6f0df7.js";import"./Caret.b694929e.js";import"./Close.8fb798f7.js";import"./Slide.3e3dec13.js";import"./runtime-dom.esm-bundler.f6259c83.js";import"./popup.92105c51.js";import"./params.af7ed354.js";import"./SeoSiteScore.88af9c09.js";import"./Blur.0f162340.js";import"./DonutChart.a3a9bd2d.js";import"./AnimatedNumber.d98413fa.js";import"./numbers.9fc174f3.js";import"./Index.4c34b46f.js";import"./Loading.39bca920.js";import"./Book.6b29a263.js";import"./Lab.a91aaa7d.js";import"./ConnectStore.d1323f77.js";import"./SetupWizardStore.8024d915.js";import"./ProBadge.e183057c.js";import"./Information.2e3d122e.js";import"./GoogleSearchPreview.9c280f08.js";import"./Url.5bd27f81.js";import"./Pencil.b89246dd.js";const X={key:0,class:"loading-container"},Z={key:1},j={class:"label"},F={key:2},J={__name:"HomepageAuditTabList",setup(R){const l="all-in-one-seo-pack",e=k(),c=D(),u=T(!1),i=A(()=>{var b;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),t=(b=c==null?void 0:c.query)==null?void 0:b.tab;return t&&r.find(_=>_.slug===t)?e.changeHomepageAuditTab(t):r.length&&e.changeHomepageAuditTab(r[0].slug),r}),m={noResults:C("No results found.",l)};function p(d){u.value||(u.value=!0,e.changeHomepageAuditTab(d),setTimeout(()=>{u.value=!1},50))}return(d,r)=>o(e).analyzing?(n(),h("div",X,[s(o($),{dark:""})])):(n(),h("div",Z,[i.value.length?(n(),y(o(O),{key:0,tabs:i.value,showSaveButton:!1,active:o(e).homepageAudit.activeTab,internal:"",onChanged:p,"skinny-tabs":""},{"var-tab":a(({tab:t})=>[f("span",{class:q(["icon",t.analyze.classColor])},[(n(),y(G(t.icon)))],2),f("span",j,g(t.label)+" ("+g(t.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):v("",!0),o(e).homeResults.results&&i.value.length?(n(),y(o(M),{key:1,section:o(e).homepageAudit.activeTab,"all-results":o(e).homeResults.results,"show-instructions":""},null,8,["section","all-results"])):v("",!0),i.value.length?v("",!0):(n(),h("div",F,[f("span",null,g(m.noResults),1)]))]))}},K=V(J,[["__scopeId","data-v-db3edc20"]]),W={class:"aioseo-seo-audit-checklist"},Y=["innerHTML"],Ve={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=k(),c=L(),u=x(),i=H(),m=T(!1),p={completeSeoChecklist:C("Complete SEO Checklist",l),refreshResults:C("Refresh Results",l),cardDescription:C("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(t,b)=>{const _=I("base-button");return n(),h("div",W,[s(o(S),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[s(o(N))]),_:1}),(d.value||o(u).internalOptions.internal.siteAnalysis.connectToken)&&!o(e).analyzeError&&o(e).homeResults.score&&!o(e).analyzing?(n(),y(o(S),{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:a(()=>[f("span",null,g(p.completeSeoChecklist),1),s(o(B),null,{tooltip:a(()=>[f("span",{innerHTML:p.cardDescription},null,8,Y)]),default:a(()=>[s(o(Q))]),_:1})]),"header-extra":a(()=>[s(_,{class:"refresh-results",type:"gray",size:"small",onClick:r,loading:m.value},{default:a(()=>[s(o(P)),U(" "+g(p.refreshResults),1)]),_:1},8,["loading"])]),default:a(()=>[s(o(K))]),_:1})):v("",!0)])}}};export{Ve as default};
