import{y as S,k as z,x as L,b as x,d as H,G as w}from"./app-core.61d75c0b.js";import{C}from"./Card.357796d1.js";import{_ as N}from"./Analyze.e16a478b.js";import{C as B}from"./Tooltip.7f0ce0d2.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.d70c869f.js";import{C as V}from"./Tabs.eadf9edf.js";import{C as G}from"./Button.7fa2ada4.js";import{_ as U}from"./iphone-frame.d53c95ea.js";import{a as q}from"./utils.51785cc7.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.a1394131.js";import{S as Q}from"./Trash.effd183e.js";import"./vendor-datetime.430013a3.js";import"./vendor-lodash.f9514987.js";import"./Caret.c4a084e6.js";import"./Close.cee3494e.js";import"./Slide.4a56936c.js";import"./SeoSiteScore.a08bd642.js";import"./Blur.d9f10327.js";import"./DonutChart.4dd7eab2.js";import"./AnimatedNumber.4be1f885.js";import"./Index.74a77fdc.js";import"./Loading.feb676f0.js";import"./Book.b8e27bdf.js";import"./Lab.c77a19cd.js";import"./ProBadge.3cd57c7c.js";import"./Information.c3ceadd3.js";import"./GoogleSearchPreview.f7d1d433.js";import"./Url.049479ea.js";import"./Pencil.acabfd26.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};
