1import{d as h,aw as b,o as k,az as r,aA as u,ax as c,aV as o,a$ as p,aB as t,j as l,b6 as B,aI as i,a3 as f,bo as _,f as g}from"./D8VVhd3u.js";import{C as z}from"./BONrVmAL.js";import{C as w}from"./DMyvFBzS.js";import{_ as A}from"./CgIgNcB1.js";import{C as N}from"./DaAHOBWF.js";import{u as D}from"./CcuoVxV1.js";import"./DctimOKT.js";import"./BsmaGs9w.js";import"./ygmsbpPY.js";const T={class:"my-12 flex min-h-12 items-center"},S={key:0,class:"flex w-full justify-center p-10"},V={class:"flex flex-col"},Z={class:"text-xs text-gray-500"},j={class:"flex flex-col"},E={class:"text-xs text-gray-500"},$=["onClick"],H=["href"],Q=h({__name:"index",setup(O){b({title:"Zoznam landing pages"});const s=g("idle"),d=g([]),x={slug:{label:"Slug",value:e=>e.tag,href:e=>({name:"admin-collections-id-edit",params:{id:e.id}})},name:{label:"Name",value:e=>e.name},seoTitle:{label:"SEO Title",value:e=>e.seo.title},seoDescription:{label:"SEO Description",value:e=>e.seo.description},created:{label:"Created"},updated:{label:"Updated"},actions:{align:"right"}},{deleteCollection:C,listCollections:y}=D();k(async()=>{s.value="loading";try{await m(),s.value="done"}catch(e){console.error(e),s.value="error"}});async function m(){d.value=await y()}async function v(e){confirm("Naozaj chcete zmazať landing page?")&&(await C(e),m())}return(e,n)=>(r(),u("div",null,[c(w,null,{default:o(()=>[...n[0]||(n[0]=[p("Zoznam landing pages",-1)])]),_:1}),t("div",T,[c(z,{to:{name:"admin-collections-create"},variant:"primary"},{default:o(()=>[...n[1]||(n[1]=[p(" Pridať landing page ",-1)])]),_:1})]),l(s)==="loading"?(r(),u("div",S,[c(A,{size:"large"})])):(r(),B(N,{key:1,columns:x,items:l(d)},{created:o(({item:a})=>[t("div",V,[t("span",null,i(a.createdBy?l(f)(a.createdBy):"-"),1),t("small",Z,i(a.createdAt?l(_)(a.createdAt):"-"),1)])]),updated:o(({item:a})=>[t("div",j,[t("span",null,i(a.updatedBy?l(f)(a.updatedBy):"-"),1),t("small",E,i(a.updatedAt?l(_)(a.updatedAt):"-"),1)])]),actions:o(({item:a})=>[t("span",{class:"link link--danger mr-6",onClick:F=>v(a)}," Zmazať ",8,$),t("a",{class:"link",href:`/${a.tag}`,target:"_blank"}," Zobraziť ",8,H)]),_:1},8,["items"]))]))}});export{Q as default}; 2//# sourceMappingURL=CrpUA1MX.js.map
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.