import{G as z}from"./constants.bc5863fe.js";import{s as k,i as L,e as x,a as H,b as w}from"./index.4b887428.js";import{C as S}from"./Card.597c7ae2.js";import{_ as N}from"./Analyze.bd0d8b1d.js";import{C as B}from"./Tooltip.23c7170d.js";import{u as D}from"./vue-router.41e9d860.js";import{C as O}from"./Tabs.13bb57b9.js";import{C as $}from"./Button.9a301412.js";import{_ as M}from"./iphone-frame.af4f65aa.js";import{g as E}from"./utils.87f13de5.js";import"./translations.e71e2202.js";import{_ as V}from"./_plugin-vue_export-helper.eefbdd86.js";import{Y as T,W as R,R as o,o as n,c as h,l as s,a1 as y,a2 as a,_ as f,ae as G,a5 as q,$ as g,a4 as b,a6 as I,a7 as U}from"./runtime-core.esm-bundler.ce5add0b.js";import{_ as v}from"./default-i18n.65d58dd6.js";import{S as P}from"./Refresh.f06a7e16.js";import{S as Q}from"./Trash.87a7d946.js";import"./helpers.633a054c.js";import"./Caret.cd869c5d.js";import"./Close.ccd53ef3.js";import"./Slide.3003ef51.js";import"./runtime-dom.esm-bundler.dc49ee3e.js";import"./popup.92105c51.js";import"./params.af7ed354.js";import"./SeoSiteScore.67f514f9.js";import"./Blur.92695742.js";import"./DonutChart.16da12c9.js";import"./AnimatedNumber.97e7e241.js";import"./numbers.cdba2587.js";import"./Index.a4d7633a.js";import"./Loading.ecf9741f.js";import"./Book.f0bec69d.js";import"./Lab.39cf16a2.js";import"./ConnectStore.f1902987.js";import"./SetupWizardStore.f23d0bfe.js";import"./ProBadge.e6ec5f9a.js";import"./Information.98ebb530.js";import"./GoogleSearchPreview.ea4e7828.js";import"./Url.9f0afcb2.js";import"./Pencil.d82df6a1.js";const W={key:0,class:"loading-container"},Y={key:1},j={class:"label"},F={key:2},J={__name:"HomepageAuditTabList",setup(A){const l="all-in-one-seo-pack",e=k(),c=D(),u=T(!1),i=R(()=>{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(d=>0<d.analyze.count),t=(C=c==null?void 0:c.query)==null?void 0:C.tab;return t&&r.find(d=>d.slug===t)?e.changeHomepageAuditTab(t):r.length&&e.changeHomepageAuditTab(r[0].slug),r}),m={noResults:v("No results found.",l)};function p(_){u.value||(u.value=!0,e.changeHomepageAuditTab(_),setTimeout(()=>{u.value=!1},50))}return(_,r)=>o(e).analyzing?(n(),h("div",W,[s(o($),{dark:""})])):(n(),h("div",Y,[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:G(["icon",t.analyze.classColor])},[(n(),y(q(t.icon)))],2),f("span",j,g(t.label)+" ("+g(t.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):b("",!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"])):b("",!0),i.value.length?b("",!0):(n(),h("div",F,[f("span",null,g(m.noResults),1)]))]))}},K=V(J,[["__scopeId","data-v-db3edc20"]]),X={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],Ve={__name:"SeoHomepageAudit",setup(A){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)},_=R(()=>!c.isUnlicensed||i.aioseo.data.isNetworkLicensed);async function r(){m.value=!0,await e.runSiteAnalyzer({refresh:!0}),m.value=!1}return(t,C)=>{const d=I("base-button");return n(),h("div",X,[s(o(S),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[s(o(N))]),_:1}),(_.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,Z)]),default:a(()=>[s(o(Q))]),_:1})]),"header-extra":a(()=>[s(d,{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})):b("",!0)])}}};export{Ve as default};
