import{a as d}from"./index.4b887428.js";import{S as y,a as A}from"./Pencil.d82df6a1.js";import{S as C}from"./Information.98ebb530.js";import"./translations.e71e2202.js";import{_ as n}from"./default-i18n.65d58dd6.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 b(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 k(o,a="site",t=!0){if(!o||typeof o!="object")return[];const f=b(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 P(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:C,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,P as g};
