1var S=(t,m,l)=>new Promise((o,a)=>{var x=n=>{try{h(l.next(n))}catch(g){a(g)}},u=n=>{try{h(l.throw(n))}catch(g){a(g)}},h=n=>n.done?o(n.value):Promise.resolve(n.value).then(x,u);h((l=l.apply(t,m)).next())});import{j as e}from"./vendor-ui-srD7R-Zr.js";import{r as d}from"./vendor-i18n-DtlmU0Vb.js";import{C as N,c as b}from"./card-2FNxPkSo.js";import{B as v}from"./badge-CvnoyUh1.js";import{B as w,N as I}from"./index-Cl50YbWy.js";import{C as P}from"./calendar-hSMdPe2I.js";import{C as k}from"./clock-BH92EWhY.js";import{L as C}from"./vendor-react-4t1c1o1L.js";import{P as M,a as _,b as y,c as $,d as O,e as T,f as H}from"./pagination-CNVHWJuK.js";import{S as J}from"./SEOHead-DFGqe1Uz.js";import{S as R}from"./StandardHero-BjTz0K9E.js";import"./vendor-recharts-BMEKEyEe.js";import"./chevron-left-B37SrKS-.js";import"./AnimatedSection-BrTxaeeR.js";const j=({post:t,variant:m="default"})=>{const l=a=>new Date(a).toLocaleDateString("de-DE",{day:"2-digit",month:"2-digit",year:"numeric"}),o=a=>{const u=a.split(" ").length;return`${Math.ceil(u/200)} min Lesezeit`};return m==="featured"?e.jsxs(N,{className:"overflow-hidden transition-all duration-300",children:[e.jsx("div",{className:"aspect-[2/1] overflow-hidden",children:e.jsx("img",{src:t.featured_image,alt:t.title,className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs(b,{className:"p-6",children:[e.jsx(v,{className:"bg-foreground text-background mb-3",children:t.categories[0]}),e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-3 line-clamp-2",children:t.title}),e.jsx("p",{className:"text-muted-foreground mb-4 line-clamp-3",children:t.excerpt}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(P,{className:"w-4 h-4 mr-1"}),e.jsx("span",{children:l(t.publication_date)})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(k,{className:"w-4 h-4 mr-1"}),e.jsx("span",{children:o(t.content)})]})]}),e.jsx(w,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(C,{to:`/blog/${t.slug}`,children:"Jetzt lesen"})})]})]})]}):m==="compact"?e.jsxs(N,{className:"overflow-hidden transition-all duration-300",children:[e.jsx("div",{className:"aspect-[2/1] overflow-hidden",children:e.jsx("img",{src:t.featured_image,alt:t.title,className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs(b,{className:"p-4",children:[e.jsx(v,{className:"bg-foreground text-background mb-2 text-xs",children:t.categories[0]}),e.jsx("h3",{className:"text-lg font-bold text-foreground line-clamp-2 mb-3",children:t.title}),e.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground mb-3",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(P,{className:"w-3 h-3 mr-1"}),e.jsx("span",{children:l(t.publication_date)})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(k,{className:"w-3 h-3 mr-1"}),e.jsx("span",{children:o(t.content)})]})]}),e.jsx(w,{asChild:!0,variant:"outline",size:"sm",className:"w-full",children:e.jsx(C,{to:`/blog/${t.slug}`,children:"Jetzt lesen"})})]})]}):e.jsxs(N,{className:"overflow-hidden transition-all duration-300",children:[e.jsx("div",{className:"aspect-[3/2] overflow-hidden",children:e.jsx("img",{src:t.featured_image,alt:t.title,className:"w-full h-full object-cover",loading:"lazy"})}),e.jsxs(b,{className:"p-6",children:[e.jsx(v,{className:"bg-foreground text-background mb-3 text-xs",children:t.categories[0]}),e.jsx("h3",{className:"text-xl font-bold text-foreground mb-3 line-clamp-2",children:t.title}),e.jsx("p",{className:"text-muted-foreground mb-4 line-clamp-3",children:t.excerpt}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(P,{className:"w-4 h-4 mr-1"}),e.jsx("span",{children:l(t.publication_date)})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(k,{className:"w-4 h-4 mr-1"}),e.jsx("span",{children:o(t.content)})]})]}),e.jsx(w,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(C,{to:`/blog/${t.slug}`,children:"Jetzt lesen"})})]})]})]})},B=12,le=()=>{const[t,m]=d.useState("alle"),[l,o]=d.useState([]),[a,x]=d.useState(1),[u,h]=d.useState(!0);d.useEffect(()=>{n()},[]),d.useEffect(()=>{x(1)},[t]);const n=()=>S(void 0,null,function*(){o([]),h(!1)}),g=["alle","Innovation","OXID Welt","Payment","E-Commerce Markt"],{filteredPosts:E,paginatedPosts:c,totalPages:r}=d.useMemo(()=>{const s=t==="alle"?l:l.filter(D=>D.categories.some(L=>L.toLowerCase()===t.toLowerCase())),i=Math.ceil(s.length/B),f=(a-1)*B,z=s.slice(f,f+B);return{filteredPosts:s,paginatedPosts:z,totalPages:i}},[l,t,a]),p=s=>{x(s),window.scrollTo({top:400,behavior:"smooth"})},A=()=>{const s=[];if(r<=7)for(let i=1;i<=r;i++)s.push(i);else{s.push(1),a>3&&s.push("ellipsis");for(let i=Math.max(2,a-1);i<=Math.min(r-1,a+1);i++)s.includes(i)||s.push(i);a<r-2&&s.push("ellipsis"),s.includes(r)||s.push(r)}return s};return e.jsxs("div",{className:"min-h-screen bg-background font-alexandria",children:[e.jsx(J,{title:"Blog â OXID eSales News & E-Commerce Insights",description:"Aktuelle Beiträge zu E-Commerce-Trends, Best Practices und OXID eShop Neuigkeiten. Bleiben Sie informiert."}),e.jsx(I,{}),e.jsxs("div",{className:"pt-16",children:[e.jsx(R,{title:"Insights, Experten-Tipps &",titleHighlight:"Produktneuheiten",subtitle:"Bleibe auf dem neuesten Stand mit unserem Blog. Hier findest du wertvolle Einblicke und aktuelle Neuigkeiten aus der Welt des E-Commerce."}),e.jsx("section",{className:"bg-background border-b border-border/20",children:e.jsx("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:e.jsx("div",{className:"flex flex-wrap gap-3 justify-center",children:g.map(s=>e.jsx("button",{onClick:()=>m(s),className:`px-6 py-3 rounded-full text-sm font-medium transition-all duration-200 ${t===s?"bg-accent text-white shadow-sm":"glass-subtle text-accent hover:bg-accent/10 border border-accent/30"}`,children:s},s))})})}),e.jsx("section",{className:"py-16 bg-background",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs("div",{className:"flex justify-between items-center mb-12",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground",children:a===1?"Aktuelle Artikel":`Artikel â Seite ${a}`}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:[E.length," Artikel gefunden"]})]}),u?e.jsxs("div",{className:"text-center py-12",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-accent mx-auto"}),e.jsx("p",{className:"mt-4 text-muted-foreground",children:"Lade Blog-Artikel..."})]}):c.length>0?e.jsxs(e.Fragment,{children:[a===1?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[c[0]&&e.jsx("div",{className:"lg:col-span-2",children:e.jsx(j,{post:c[0],variant:"featured"})}),c.length>1&&e.jsx("div",{className:"space-y-8",children:c.slice(1,3).map(s=>e.jsx(j,{post:s,variant:"compact"},s.id))})]}),c.length>3&&e.jsxs("section",{className:"mt-16",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-foreground mb-12",children:"Weitere Artikel"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:c.slice(3).map(s=>e.jsx(j,{post:s},s.id))})]})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:c.map(s=>e.jsx(j,{post:s},s.id))}),r>1&&e.jsx("div",{className:"mt-16 flex justify-center",children:e.jsx(M,{children:e.jsxs(_,{children:[e.jsx(y,{children:e.jsx($,{href:"#",onClick:s=>{s.preventDefault(),a>1&&p(a-1)},className:a===1?"pointer-events-none opacity-50":"cursor-pointer hover:bg-accent/10"})}),A().map((s,i)=>e.jsx(y,{children:s==="ellipsis"?e.jsx(O,{}):e.jsx(T,{href:"#",onClick:f=>{f.preventDefault(),p(s)}
1,isActive:a===s,className:`cursor-pointer ${a===s?"bg-accent text-white hover:bg-accent/90 border-accent":"hover:bg-accent/10 hover:text-accent"}`,children:s})},i)),e.jsx(y,{children:e.jsx(H,{href:"#",onClick:s=>{s.preventDefault(),a<r&&p(a+1)},className:a===r?"pointer-events-none opacity-50":"cursor-pointer hover:bg-accent/10"})})]})})})]}):e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-muted-foreground mb-4",children:t==="alle"?"Noch keine Blog-Artikel vorhanden.":`Keine Artikel in der Kategorie "${t}" gefunden.`})})]})})]})]})};export{le 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.