1import{h as x,x as j,G as I,l as r,o,i as n,j as s,F as _,B as p,I as g,t as h,k as v,w as T,n as U,p as D,D as f,q as L,s as N}from"./KQCWx4v5.js";import{b as P}from"./CVsBNpV8.js";import"./lmtellMW.js";const V={key:0},A={id:"top-categories"},q={class:"container"},z={class:"row g-md-2 g-0 mt-1"},E={class:"text-muted fw-light mb-1"},F={class:"row"},H={class:"d-flex align-items-center"},M=["src","alt"],G={key:1,class:"icon-wrapper d-flex align-items-center justify-content-center"},Y={class:"card-title mb-0 ms-3"},$=x({__name:"HomeTopCategories",props:{categories:{}},setup(J){const b=j(),y=f(!1),c=f({}),k={},l=L(()=>c.value&&Object.keys(c.value).length>0?c.value:k),w=new Set(["blender","spinner","circle","dot-circle","adjust"]),m={Inmueble:"home",VehÃculo:"car","Bien mueble":"box-open","Unidad productiva":"industry","Otra catalogación":"gavel"},C=(e,t)=>e&&!w.has(e)?e:t&&m[t]?m[t]:"gavel",B=e=>{const t={"Otra catalogación":"Otras catalogaciones","Unidad productiva":"Unidades productivas","Bien mueble":"Bienes muebles"};if(t[e])return t[e];const d=["a","e","i","o","u"],i=e.slice(-1).toLowerCase();return i==="s"?e:d.includes(i)?e+"s":e+"es"};return I(async()=>{try{const e=await b.getTopByCategory();e&&Object.keys(e).length>0&&(c.value=e)}catch{}}),(e,t)=>{const d=U,i=P;return r(l)&&Object.keys(r(l)).length>0?(o(),n("div",V,[s("section",A,[s("div",q,[t[0]||(t[0]=s("div",{class:"row pt-3"},[s("div",{class:"col-12"},[s("h2",{class:"main-title"},"Subastas más buscadas"),s("p",{class:"subtitle"}," Descubre los activos que están despertando mayor interés en nuestra comunidad. Una selección de las oportunidades más deseadas del momento. ")])],-1)),s("div",z,[(o(!0),n(_,null,p(r(l),(S,u,O)=>(o(),n("div",{key:u,class:g(["col-lg-4 col-md-6 col-12 mb-md-0 mb-1 mt-2",O>2?"mt-md-2":"mt-md-0"])},[s("h3",E,h(B(String(u))),1),s("div",F,[(o(!0),n(_,null,p(S,a=>(o(),n("div",{key:a.id,class:"col-12 py-1"},[v(d,{to:a.url||"#",class:"btn-link"},{default:T(()=>[s("div",H,[a.imgUrl?(o(),n("img",{key:0,style:{width:"auto",height:"32px"},src:a.imgUrl,alt:a.name,loading:"lazy",width:"32",height:"32"},null,8,M)):(o(),n("div",G,[s("i",{class:g("fas fa-"+C(a.icon,String(u)))},null,2)])),s("h5",Y,h(a.name),1)])]),_:2},1032,["to"])]))),128))])],2))),128))])])]),v(i,{visible:r(y)},null,8,["visible"])])):D("",!0)}}}),W=N($,[["__scopeId","data-v-6d80c029"]]);export{W as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.