import{u as d}from"./index.bd66e758.js";import{S as y,a as A}from"./Caret.382b7591.js";import{S as C}from"./Information.3b2ed489.js";import"./translations.d159963e.js";import{_ as n}from"./default-i18n.20001971.js";const r="all-in-one-seo-pack",c=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?`${c.aioseo.urls.aio.seoAnalysis}#/${t}?tab=passed`:null},warnings:{name:n("Warnings",r),color:g.warnings,link:a?`${c.aioseo.urls.aio.seoAnalysis}#/${t}?tab=warning`:null},issues:{name:n("Issues",r),color:g.issues,link:a?`${c.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,u=parseInt(o.total)||0,_={...f[s],count:e,ratio:l===0?100:0<u?e/u*100:0};0<e&&i.push(_)}),i.forEach((s,l)=>(l===0||i.forEach((e,u)=>{l<u&&(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};
