import{G as A}from"./constants.fe8bda37.js";import{p as v,j as T,e as x,u as D,m as L,b as B}from"./index.bd66e758.js";import{C as I}from"./Card.88a70537.js";import{C as O}from"./Tabs.38c9ba5c.js";import{_ as w}from"./iphone-frame.ba9c1450.js";import{_ as M}from"./Analyze.a9cf9064.js";import{C as N}from"./Tooltip.418c677c.js";import{S as G}from"./Refresh.f1edec25.js";import{S as V}from"./index.eb92a2a8.js";import"./translations.d159963e.js";import{_ as E}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as o}from"./default-i18n.20001971.js";import{x as t,o as _,c as H,H as r,m as e,l as y,a as c,t as u,y as q,K,b as f}from"./runtime-dom.esm-bundler.5d5e6b71.js";import"./helpers.bf0d86e6.js";import"./Caret.382b7591.js";import"./Slide.a525748d.js";import"./vue-router.ad00dfec.js";import"./ProBadge.aeac9858.js";import"./Information.3b2ed489.js";import"./GoogleSearchPreview.d0cab464.js";import"./Url.47c8a1c7.js";import"./popup.92105c51.js";import"./params.af7ed354.js";import"./SeoSiteScore.12437843.js";import"./utils.55c82852.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";const n="all-in-one-seo-pack",P={setup(){return{analyzerStore:v(),licenseStore:T(),optionsStore:x(),rootStore:D(),settingsStore:L()}},components:{CoreCard:I,CoreMainTabs:O,CoreSeoSiteAnalysisResults:w,CoreSeoSiteScoreAnalyze:M,CoreTooltip:N,SvgCircleQuestionMark:V,SvgRefresh:G},data(){return{internalDebounce:!1,homeResults:{results:[],score:null},strings:{completeSeoChecklist:o("Complete SEO Checklist",n),refreshResults:o("Refresh Results",n),cardDescription:o("These are the results our SEO Analzyer has generated after analyzing the homepage of your website.",n)+" "+B.getDocLink(A.learnMore,"seoAnalyzer",!0)}}},computed:{tabs(){var m;const s=(m=this.homeResults)==null?void 0:m.score;return[{slug:"all-items",label:o("All Items",n),analyze:{classColor:"black",count:s?this.analyzerStore.allItemsCount():0}},{slug:"critical",label:o("Important Issues",n),analyze:{classColor:"red",count:s?this.analyzerStore.criticalCount():0}},{slug:"recommended-improvements",label:o("Recommended Improvements",n),analyze:{classColor:"blue",count:s?this.analyzerStore.recommendedCount():0}},{slug:"good-results",label:o("Good Results",n),analyze:{classColor:"green",count:s?this.analyzerStore.goodCount():0}}]}},methods:{processChangeTab(s){this.internalDebounce||(this.internalDebounce=!0,this.settingsStore.changeTab({slug:"seoAuditChecklist",value:s}),setTimeout(()=>{this.internalDebounce=!1},50))},async refresh(){this.analyzerStore.analyzing=!0,await this.analyzerStore.runSiteAnalyzer({refresh:!0}),this.analyzerStore.getSiteAnalysisResults().then(()=>{this.homeResults=this.analyzerStore.homeResults,this.analyzerStore.analyzing=!1})}},mounted(){this.homeResults=this.analyzerStore.homeResults}},j={class:"aioseo-seo-audit-checklist"},Q=["innerHTML"],U={class:"label"};function F(s,m,J,a,l,p){var g;const S=t("core-seo-site-score-analyze"),h=t("core-card"),d=t("svg-circle-question-mark"),C=t("core-tooltip"),b=t("svg-refresh"),z=t("base-button"),k=t("core-main-tabs"),R=t("core-seo-site-analysis-results");return _(),H("div",j,[r(h,{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:e(()=>[r(S)]),_:1}),(a.rootStore.isPro&&a.licenseStore.licenseKey||a.optionsStore.internalOptions.internal.siteAnalysis.connectToken)&&((g=l.homeResults)!=null&&g.score)?(_(),y(h,{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:e(()=>[c("span",null,u(l.strings.completeSeoChecklist),1),r(C,null,{tooltip:e(()=>[c("span",{innerHTML:l.strings.cardDescription},null,8,Q)]),default:e(()=>[r(d)]),_:1})]),"header-extra":e(()=>[r(z,{class:"refresh-results",type:"gray",size:"small",onClick:p.refresh,loading:a.analyzerStore.analyzing},{default:e(()=>[r(b),q(" "+u(l.strings.refreshResults),1)]),_:1},8,["onClick","loading"])]),tabs:e(()=>[r(k,{tabs:p.tabs,showSaveButton:!1,active:a.settingsStore.settings.internalTabs.seoAuditChecklist,internal:"",onChanged:p.processChangeTab,"skinny-tabs":""},{"var-tab":e(({tab:i})=>[c("span",{class:K(["round",i.analyze.classColor])},u(i.analyze.count||0),3),c("span",U,u(i.label),1)]),_:1},8,["tabs","active","onChanged"])]),default:e(()=>{var i;return[((i=l.homeResults)==null?void 0:i.results)!==null?(_(),y(R,{key:0,section:a.settingsStore.settings.internalTabs.seoAuditChecklist,"all-results":l.homeResults.results,"show-instructions":""},null,8,["section","all-results"])):f("",!0)]}),_:1})):f("",!0)])}const Le=E(P,[["render",F]]);export{Le as default};
