import{z as b,h as z,b as L,_ as x,c as H,G as w}from"./app-core.b862f9c8.js";import{C as S}from"./Card.482ec741.js";import{_ as N}from"./Analyze.c0c632f2.js";import{C as B}from"./Tooltip.cb3a78f6.js";import{at as D,v as t,f as n,i as h,a0 as o,Q as g,R as a,j as _,P as M,S as O,U as d,M as y,u as k,r as T,aq as $,ae as E}from"./vendor-vue-ui.f00a1236.js";import{C as V}from"./Tabs.37afc36c.js";import{C as q}from"./Button.6c09d515.js";import{_ as G}from"./iphone-frame.dc1c1697.js";import{a as U}from"./utils.bde1b60b.js";import{_ as I}from"./_plugin-vue_export-helper.eefbdd86.js";import{_ as v}from"./vendor-other.7b559694.js";import{S as P}from"./Refresh.75c4175a.js";import{S as Q}from"./Trash.c3e8db0b.js";import"./vendor-lodash.d3ad8b99.js";import"./Caret.e6c9f7cc.js";import"./Close.de45e465.js";import"./Slide.805812ec.js";import"./SeoSiteScore.6f20cf40.js";import"./Blur.92d1018b.js";import"./DonutChart.a65cfb95.js";import"./AnimatedNumber.c0fbf65a.js";import"./Index.b1b54630.js";import"./Loading.e989752b.js";import"./Book.b431c2a9.js";import"./Lab.89afa8bb.js";import"./ProBadge.838818f5.js";import"./Information.bbfb3caf.js";import"./GoogleSearchPreview.14fc9832.js";import"./Url.2a5968be.js";import"./Pencil.1ca5815a.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=b(),C=D(),c=T(!1),i=k(()=>{const r=U({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),s=C?.query?.tab;return s&&r.find(f=>f.slug===s)?e.changeHomepageAuditTab(s):r.length&&e.changeHomepageAuditTab(r[0].slug),r}),u={noResults:v("No results found.",l)};function m(p){c.value||(c.value=!0,e.changeHomepageAuditTab(p),setTimeout(()=>{c.value=!1},50))}return(p,r)=>t(e).analyzing?(n(),h("div",j,[o(t(q),{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:m,"skinny-tabs":""},{"var-tab":a(({tab:s})=>[_("span",{class:M(["icon",s.analyze.classColor])},[(n(),g(O(s.icon)))],2),_("span",J,d(s.label)+" ("+d(s.analyze.count||0)+")",1)]),_:1},8,["tabs","active"])):y("",!0),t(e).homeResults.results&&i.value.length?(n(),g(t(G),{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,[_("span",null,d(u.noResults),1)]))]))}},X=I(W,[["__scopeId","data-v-db3edc20"]]),Y={class:"aioseo-seo-audit-checklist"},Z=["innerHTML"],He={__name:"SeoHomepageAudit",setup(R){const l="all-in-one-seo-pack",e=b(),C=z(),c=L(),i=x(),u=T(!1),m={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)},p=k(()=>!C.isUnlicensed||c.aioseo.data.isNetworkLicensed);async function r(){u.value=!0,await e.runSiteAnalyzer({refresh:!0}),u.value=!1}return(s,f)=>{const A=$("base-button");return n(),h("div",Y,[o(t(S),{slug:"connectOrScore","hide-header":"","no-slide":"",toggles:!1},{default:a(()=>[o(t(N))]),_:1}),(p.value||t(i).hasSiteAnalysisConnectToken)&&!t(e).analyzeError&&t(e).homeResults.score&&!t(e).analyzing?(n(),g(t(S),{key:0,slug:"completeSeoChecklist","no-slide":"",toggles:!1},{header:a(()=>[_("span",null,d(m.completeSeoChecklist),1),o(t(B),null,{tooltip:a(()=>[_("span",{innerHTML:m.cardDescription},null,8,Z)]),default:a(()=>[o(t(Q))]),_:1})]),"header-extra":a(()=>[o(A,{class:"refresh-results",type:"gray",size:"small",onClick:r,loading:u.value},{default:a(()=>[o(t(P)),E(" "+d(m.refreshResults),1)]),_:1},8,["loading"])]),default:a(()=>[o(t(X))]),_:1})):y("",!0)])}}};export{He as default};
