import{y as S,k as z,x as L,b as x,d as H,G as w}from"./app-core.82d0a9b8.js";import{C}from"./Card.2051539b.js";import{_ as N}from"./Analyze.97cdae25.js";import{C as B}from"./Tooltip.16bec62e.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.02763c14.js";import{C as V}from"./Tabs.8e508d9e.js";import{C as G}from"./Button.b03184b6.js";import{_ as U}from"./iphone-frame.99092a8a.js";import{a as q}from"./utils.5eebca08.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as v}from"./vendor-other.2cdd5822.js";import{S as P}from"./Refresh.77921d7f.js";import{S as Q}from"./Trash.9c01fca5.js";import"./vendor-datetime.430013a3.js";import"./vendor-lodash.f9514987.js";import"./Caret.1dd03f59.js";import"./Close.ed64f0a2.js";import"./Slide.59825bf3.js";import"./SeoSiteScore.988d72f6.js";import"./Blur.a74558b3.js";import"./DonutChart.47a3364a.js";import"./AnimatedNumber.88b07a06.js";import"./Index.9b9c860d.js";import"./Loading.d20bba52.js";import"./Book.764f61e7.js";import"./Lab.dd0edba3.js";import"./ProBadge.e8abb23c.js";import"./Information.994a9b26.js";import"./GoogleSearchPreview.d41069ca.js";import"./Url.98506653.js";import"./Pencil.b091de6b.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"],we={__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(N))]),_: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(B),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{we as default};
