1import{s as b,k as p,G as N,A as r,b as s,o,c as d,g as c,i as S,t as _,B as T,h,e as f,F as w,y as A,f as B,T as V,C as q}from"./CnnHI4eV.js";import{_ as C}from"./btzAn8Vn.js";import L from"./FHkCPM3F.js";import{b as x}from"./C_LtU1BF.js";import"./ut1Y4EHe.js";import"./5xLRbz5N.js";import"./BnmJMHbg.js";import"./CpWmnYms.js";const F={class:"h2 me-2"},U={__name:"BlockPushPressInstitutional",props:{titre_du_bloc:{type:Array,required:!1},press_institutional:{type:[Object,null,String],required:!0}},setup(l){const{listingPath:g}=b(),m=g("press_institutional"),u=l,n=p([]),i=p({list:[],total:0}),y=async()=>{var t;try{const e=await x("wp-json/wpnuxt/v1/posts/presse-institutionnelle",{query:{"cache-ttl":3600}});n.value=((t=e.data.value)==null?void 0:t.list)||[]}catch(e){console.error(e),n.value=[]}};return Array.isArray(u.press_institutional)&&u.press_institutional.length>0?n.value=u.press_institutional:y(),N(n,async t=>{i.value.list=t.map(e=>({title:e.post_title,image:e.meta.main_image.img_files,image_infos:e.meta.main_image.img_infos,path:e.path,tag:r("Presse")})),i.value.total=t.length},{immediate:!0}),(t,e)=>{const k=q,v=C,P=L;return s(i).total?(o(),d(P,{key:0,"previous-arrow-class":"icon-slider--prev","next-arrow-class":"icon-slider--next","item-name":("__"in t?t.__:s(r))("Contenu institutionnel"),class:"block-push-press-insitutional wrapper"},{header:c(()=>{var a;return[S("h2",F,_((a=l.titre_du_bloc)!=null&&a.has_custom_push_title?l.titre_du_bloc.custom_push_title:("__"in t?t.__:s(r))("Presse Institutionnelle")),1),s(m)?(o(),d(k,{key:0,class:"cta cta--secondary",to:s(m)},{default:c(()=>[T(_(("__"in t?t.__:s(r))("Voir tous les communiqués disponibles"))+" ("+_(s(i).total)+") ",1)]),_:1},8,["to"])):h("",!0)]}),items:c(()=>[(o(!0),f(w,null,A(s(i).list,(a,I)=>(o(),f("li",{key:(a==null?void 0:a.ID)||I},[B(v,V({variant:"small",ref_for:!0},a),null,16)]))),128))]),_:1},8,["item-name"])):h("",!0)}}};export{U 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.