import{b as d}from"./app-core.82d0a9b8.js";import{S as y,a as A}from"./Pencil.b091de6b.js";import{S as b}from"./Information.994a9b26.js";import{_ as n}from"./vendor-other.2cdd5822.js";const r="all-in-one-seo-pack",u=d(),g={good:"#00AA63",warnings:"#F18200",issues:"#DF2A4A"},p={error:"error",warning:"warning",passed:"passed"};function C(o,a=!0){const t=o==="homepage"?"seo-audit-checklist":"seo-site-audit";return{good:{name:n("Good",r),color:g.good,link:a?`${u.aioseo.urls.aio.seoAnalysis}#/${t}?tab=passed`:null},warnings:{name:n("Warnings",r),color:g.warnings,link:a?`${u.aioseo.urls.aio.seoAnalysis}#/${t}?tab=warning`:null},issues:{name:n("Issues",r),color:g.issues,link:a?`${u.aioseo.urls.aio.seoAnalysis}#/${t}?tab=error`:null}}}function $(o,a="site",t=!0){if(!o||typeof o!="object")return[];const f=C(a,t),m=Object.keys(f),i=[];return m.forEach((s,l)=>{const e=parseInt(o[s])||0,c=parseInt(o.total)||0,_={...f[s],count:e,ratio:l===0?100:0<c?e/c*100:0};0<e&&i.push(_)}),i.forEach((s,l)=>(l===0||i.forEach((e,c)=>{l<c&&(s.ratio+=e.ratio)}),s)),i}function k(o){return[{slug:p.error,label:n("Issues",r),name:n("Issues",r),icon:y,analyze:{classColor:"red",count:o.error}},{slug:p.warning,label:n("Warnings",r),name:n("Warnings",r),icon:b,analyze:{classColor:"orange",count:o.warning}},{slug:p.passed,label:n("Good",r),name:n("Good",r),icon:A,analyze:{classColor:"green",count:o.good}}]}export{k as a,$ as g};
