import{a as A}from"./chunk-NM5NZR7B.js";import{a as k}from"./chunk-K3ZVHPCQ.js";import{f as I}from"./chunk-7OMUUYH5.js";import{Ha as h,Jc as w,Ma as n,Na as a,O as d,Qb as r,Rb as g,Sb as u,Wa as v,Yb as M,ac as O,cc as c,cd as B,dc as f,ec as S,ga as b,jb as p,pb as P,qb as y,rb as _,sb as i,tb as l,ub as x,ya as C}from"./chunk-MBQ67NQC.js";var E=(o,s,e)=>["blogs",o,"posts",s,e];function D(o,s){if(o&1&&(i(0,"div",2)(1,"a",3),c(2,"kebabCase"),c(3,"kebabCase"),i(4,"div",4)(5,"div",5),x(6,"img",6),l(),i(7,"div",7)(8,"p",8),r(9),l(),i(10,"p",9),r(11),l(),i(12,"p",10),r(13),i(14,"span",11),r(15),c(16,"date"),l()()()()()()),o&2){let e=s.$implicit;n(),p("routerLink",O(13,E,f(2,6,e==null?null:e.nombreSubseccion),e==null?null:e.idVideo,f(3,8,e==null?null:e.tituloSeo))),n(5),p("src",e==null?null:e.imgAutor,h),n(3),u("BLOG: ",e==null?null:e.nombreSubseccion,""),n(2),g(e==null?null:e.tituloVideo),n(2),u("por ",e==null?null:e.nombreAutor," "),n(2),g(S(16,10,e==null?null:e.fecha,"dd-MM-yyyy"))}}var J=(()=>{class o{noticiasService;configService;elementRef;constantesGlobales;posts=v([]);fechaHoy;constructor(e,t,m){this.noticiasService=e,this.configService=t,this.elementRef=m}ngOnInit(){this.fechaHoy=Date.now(),this.constantesGlobales=this.configService.getConstantesGlobales();let e=this.constantesGlobales.idAmbito;this.noticiasService.getPostsBlog(4,e,"ambito").pipe(d()).subscribe(t=>{this.posts.set(t.video)}),this.configService.getConfigPrensa().pipe(d()).subscribe(t=>{this.setCssColors(t.general["global-constants"])})}setCssColors(e){e.accent_color&&this.elementRef.nativeElement.style.setProperty("--accent-color",e.accent_color)}static \u0275fac=function(t){return new(t||o)(a(I),a(k),a(C))};static \u0275cmp=b({type:o,selectors:[["app-bloque-ultimos-blogs"]],standalone:!0,features:[M],decls:5,vars:0,consts:[[1,"contenedor-blogs"],[1,"titulo-bloque"],[1,"item-blog"],[3,"routerLink"],[1,"blog"],[1,"imagenPost"],["loading","lazy","width","100%","height","100%",1,"imagen-autor",3,"src"],[1,"secc-data-user"],[1,"tituloBlog"],[1,"tituloPost"],[1,"tituloAutor"],[1,"fechaBlog"]],template:function(t,m){t&1&&(i(0,"div",0)(1,"h1",1),r(2,"BLOGS | \xDALTIMAS PUBLICACIONES"),l(),y(3,D,17,17,"div",2,P),l()),t&2&&(n(3),_(m.posts()))},dependencies:[B,w,A],styles:[".contenedor-blogs[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1em;justify-content:space-between;padding:2em 0}.contenedor-blogs[_ngcontent-%COMP%] .item-blog[_ngcontent-%COMP%]{width:calc(50% - 10px);border-bottom:1px solid var(--accent-color)}.titulo-bloque[_ngcontent-%COMP%]{width:100%;color:var(--accent-color);margin:0;font-weight:400;font-size:1.5rem;border-bottom:3px solid var(--accent-color)}.blog[_ngcontent-%COMP%]{display:flex;margin-bottom:1em}.tituloBlog[_ngcontent-%COMP%]{font-weight:500;color:#adadad;text-transform:uppercase}.tituloPost[_ngcontent-%COMP%]{font-size:1.3em;font-family:Playfair Display,Garamond,Hoefler Text,Times New Roman,Times,serif}.secc-data-user[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;margin:0 1em;gap:.7em}.secc-data-user[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}a[_ngcontent-%COMP%]{text-decoration:unset;color:inherit}.imagen-autor[_ngcontent-%COMP%]{display:block}.imagenPost[_ngcontent-%COMP%]{align-content:center}.imagenPost[_ngcontent-%COMP%] .imagen-autor[_ngcontent-%COMP%]{width:8vh;height:8vh;border-radius:50%;background-color:#282d38;object-fit:cover}.tituloAutor[_ngcontent-%COMP%], .tituloBlog[_ngcontent-%COMP%], .tituloPost[_ngcontent-%COMP%]{line-height:1.3em}.tituloAutor[_ngcontent-%COMP%]{color:var(--accent-color);font-weight:500}.fechaBlog[_ngcontent-%COMP%]{color:#adadad}.item-blog[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}@media only screen and (max-width: 468px){.contenedor-blogs[_ngcontent-%COMP%]{flex-direction:row;background-size:cover}.item-blog[_ngcontent-%COMP%]{flex:100%;border-left:0;border-top:1px solid white;border-bottom:1px solid white}}"],changeDetection:0})}return o})();export{J as a};