1import{b as e,c as t}from"./J_4nI4NO.js";import{_ as a}from"./CV9Af5t_.js";import{_ as s}from"./DX6unkFz.js";import{_ as o}from"./B0exljpa.js";import{e as r,w as l,p as i,S as n,s as m,c,k as p,B as d,u,U as w,o as j,h as v}from"#entry";import{e as f,s as y}from"./D-V1Yezh.js";import{u as _}from"./Bvdk-4nA.js";import"./BCzZQlR_.js";import"./CXUWDbkB.js";import"./CvtR3bi2.js";import"./CmiL7Ui0.js";import"./DcTfXxSp.js";import"./EJTCMi8-.js";const x={__name:"index",async setup(x){let L,b;const h=r(!1),k=r(null),g=r("");try{[L,b]=l(()=>f()),await L,b();const e=([L,b]=l(()=>i("token")),L=await L,b(),L),t=([L,b]=l(()=>i("csrf-token")),L=await L,b(),L),{data:a,error:s}=([L,b]=l(()=>_("/api/adm/schema/newsletter_vue",{server:!0,lazy:!1,headers:{Authorization:e?`Bearer ${e.value}`:"","X-CSRF-Token":t?t.value:""}},"$5VdnOPH4dg")),L=await L,b(),L);s.value?n("/"):a.value.bigList?k.value=a.value:n("/")}catch(R){g.value=R.message}m({title:"App | Liste des "+e.newsletters});return(e,r)=>{const l=t,i=a,n=s,m=o;return j(),c("div",null,[p(n,{title:"Liste des newsletters"},{default:d(()=>[p(i,null,{default:d(()=>[p(l,{option:{template:"createBig",tip:"Exporter en Excel",title:"Exporter en Excel"},onClick:r[0]||(r[0]=v(e=>(async()=>{const e=await(new y.List).routes(`adm/newsletter/excel?${y.coockie("/api/adm/newsletter/list")}`).query("empty"),t=window.URL.createObjectURL(new Blob([e.data._value])),a=document.createElement("a");a.href=t,a.download="newsletter_"+(new Date).toISOString().slice(0,19).replace("T"," ")+".xlsx",document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(t)})(),["stop"]))})]),_:1})]),_:1}),p(m,{createopen:u(h),"onUpdate:createopen":r[1]||(r[1]=e=>w(h)?h.value=e:null),list:{model:u(k),modelType:u(k).bigList,route:"adm/newsletter/list"},action:[{template:"delete",type:{route:"adm/newsletter/delete",model:u(k),redirect:""}}]},null,8,["createopen","list","action"])])}}};export{x 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.