import{j as t}from"./jsx-runtime.D_zvdyIk.js";import{R as n}from"./router.B9yJslVs.js";import{u as d}from"./useIsMounted.BP-0-XYC.js";import{u as p}from"./useTranslation.Dg7DwAC5.js";import{r as m}from"./route.D5BPSNZk.js";import{c as s}from"./utils.BZbvJs_N.js";import{R as f,a as u,b as h,c as g}from"./index.DdUPy29j.js";import{l as c}from"./utils.D6Ui05B2.js";import"./site.Deo0TYgJ.js";import"./index.BIRwh3HZ.js";import"./_commonjsHelpers.CqkleIqs.js";import"./index.RTTH55m1.js";import"./index.3whys8t3.js";import"./site-config.CgQ_bxrG.js";function M({prevPost:o,nextPost:r,className:x,locale:a}){const i=d(),{t:e}=p();if(!o&&!r)return null;const l="smooth";return t.jsxs("div",{className:s("mt-4 flex flex-col gap-3 border-border border-t pt-4 md:mt-0 md:pt-2",x),children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o?i&&t.jsxs("a",{href:c(m(n.Post,o),a),className:s("group flex items-center gap-1.5 rounded-md px-2 py-1.5 transition-colors","text-muted-foreground hover:bg-accent hover:text-primary","min-w-0 max-w-[45%] flex-1"),title:o.title,children:[t.jsx(f,{className:"h-4 w-4 shrink-0"}),t.jsx("span",{className:"truncate text-xs",children:o.title})]}):t.jsx("div",{className:"max-w-[45%] flex-1"}),r?i&&t.jsxs("a",{href:c(m(n.Post,r),a),className:s("group flex items-center gap-1.5 rounded-md px-2 py-1.5 transition-colors","text-muted-foreground hover:bg-accent hover:text-primary","min-w-0 max-w-[45%] flex-1 justify-end text-right"),title:r.title,children:[t.jsx("span",{className:"truncate text-xs",children:r.title}),t.jsx(u,{className:"h-4 w-4 shrink-0"})]}):t.jsx("div",{className:"max-w-[45%] flex-1"})]}),i&&t.jsxs("div",{className:"flex justify-center gap-2",children:[t.jsxs("button",{type:"button",onClick:()=>window.scrollTo({top:0,behavior:l}),className:s("flex items-center justify-center gap-1.5 rounded-md px-2 py-1.5 transition-colors","text-muted-foreground text-xs hover:bg-accent hover:text-primary"),title:e("floating.backToTop"),"aria-label":e("floating.backToTop"),children:[t.jsx(h,{className:"h-4 w-4"}),e("floating.backToTop")]}),t.jsxs("button",{type:"button",onClick:()=>window.scrollTo({top:document.body.scrollHeight,behavior:l}),className:s("flex items-center justify-center gap-1.5 rounded-md px-2 py-1.5 transition-colors","text-muted-foreground text-xs hover:bg-accent hover:text-primary"),title:e("floating.scrollToBottom"),"aria-label":e("floating.scrollToBottom"),children:[t.jsx(g,{className:"h-4 w-4"}),e("floating.scrollToBottom")]})]})]})}export{M as SeriesNavigation};
