import{a as d}from"./index.ed1fc0db.js";import{S as y,a as A}from"./Pencil.b89246dd.js";import{S as C}from"./Information.2e3d122e.js";import"./translations.d159963e.js";import{_ as n}from"./default-i18n.20001971.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};
