import{B as S,i as z,a as L,b as x,e as H,G as w}from"./app-core.152db1db.js";import{C}from"./Card.d86f3fdf.js";import{_ as B}from"./Analyze.8928e468.js";import{C as N}from"./Tooltip.fea720f1.js";import{au as D,v as t,f as n,i as h,a0 as s,Q as g,R as a,j as d,P as M,S as O,U as _,M as y,u as k,r as T,as as $,ae as E}from"./vendor-vue-ui.9852a9dd.js";import{C as V}from"./Tabs.e2704228.js";import{C as G}from"./Button.28b2bb45.js";import{_ as U}from"./iphone-frame.7dbd1ca1.js";import{a as q}from"./utils.8e3c9b97.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as v}from"./vendor-other.35999c47.js";import{S as P}from"./Refresh.d24a7703.js";import{S as Q}from"./Trash.afa6bd6f.js";import"./vendor-datetime.361c8690.js";import"./vendor-lodash.e0b5303e.js";import"./Caret.34a0e986.js";import"./Close.13ddaab7.js";import"./Slide.51c3c11f.js";import"./SeoSiteScore.06d7089a.js";import"./Blur.a1cd2e63.js";import"./DonutChart.62e47aac.js";import"./AnimatedNumber.5ab21319.js";import"./Index.4aa79543.js";import"./Index.5485cb4c.js";import"./Loading.fbc943ed.js";import"./Book.ce587673.js";import"./Lab.46828bd2.js";import"./ProBadge.3c9484e3.js";import"./Information.360919d9.js";import"./GoogleSearchPreview.bdb3547e.js";import"./Url.5e0a7f89.js";import"./Pencil.f886c818.js";const j={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=S(),b=D(),c=T(!1),i=k(()=>{const r=q({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(f=>0<f.analyze.count),o=b?.query?.tab;return o&&r.find(f=>f.slug===o)?e.changeHomepageAuditTab(o):r.length&&e.changeHomepageAuditTab(r[0].slug),r}),u={noResults:v("No results found.",l)};function p(m){c.value||(c.value=!0,e.changeHomepageAuditTab(m),setTimeout(()=>{c.value=!1},50))}return(m,r)=>t(e).analyzing?(n(),h("div",j,[s(t(G),{dark:""})])):(n(),h("div",F,[i.value.length?(n(),g(t(V),{key:0,tabs:i.value,showSaveButton:!1,active:t(e).homepageAudit.activeTab,internal:"",onChanged:p,"skinny-tabs":""},{"var-tab":a(({tab:o})=>[d("span",{class:M(["icon",o.analyze.classColor])},[(n(),g(O(o.icon)))],2),d("span",J,_(o.label)+" ("+_(o.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):y("",!0),t(e).homeResults.results&&i.value.length?(n(),g(t(U),{key:1,section:t(e).homepageAudit.activeTab,"all-results":t(e).homeResults.results,"show-instructions":""},null,8,["section","all-results"])):y("",!0),i.value.length?y("",!0):(n(),h("div",K,[d("span",null,_(u.noResults),1)]))]))}},X=I(W,[["__scopeId","data-v-db3edc20"]]),Y={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],Be={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=S(),b=z(),c=L(),i=x(),u=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(w.learnMore,"seoAnalyzer",!0)},m=k(()=>!b.isUnlicensed||i.aioseo.data.isNetworkLicensed);async function r(){u.value=!0,await e.runSiteAnalyzer({refresh:!0}),u.value=!1}return(o,f)=>{const A=$("base-button");return n(),h("div",Y,[s(t(C),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[s(t(B))]),_:1}),(m.value||t(c).internalOptions.internal.siteAnalysis.connectToken)&&!t(e).analyzeError&&t(e).homeResults.score&&!t(e).analyzing?(n(),g(t(C),{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:a(()=>[d("span",null,_(p.completeSeoChecklist),1),s(t(N),null,{tooltip:a(()=>[d("span",{innerHTML:p.cardDescription},null,8,Z)]),default:a(()=>[s(t(Q))]),_:1})]),"header-extra":a(()=>[s(A,{class:"refresh-results",type:"gray",size:"small",onClick:r,loading:u.value},{default:a(()=>[s(t(P)),E(" "+_(p.refreshResults),1)]),_:1},8,["loading"])]),default:a(()=>[s(t(X))]),_:1})):y("",!0)])}}};export{Be as default};
