'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import Link from 'next/link';
import { cn } from '@/lib/utils';
import { ArrowLeft, ArrowRight } from '@phosphor-icons/react';
export function PageNav({ prev, next, className }) {
    if (!prev && !next) return null;
    return /*#__PURE__*/ _jsxs("nav", {
        className: cn('flex items-center justify-between gap-4 pt-8 mt-8 border-t border-border', className),
        "aria-label": "Page navigation",
        children: [
            prev ? /*#__PURE__*/ _jsxs(Link, {
                href: prev.href,
                className: "group flex-1 flex flex-col items-start gap-1 p-4 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/30 transition-colors",
                children: [
                    /*#__PURE__*/ _jsxs("span", {
                        className: "flex items-center gap-1 text-xs text-muted-foreground",
                        children: [
                            /*#__PURE__*/ _jsx(ArrowLeft, {
                                className: "h-3 w-3"
                            }),
                            "Previous"
                        ]
                    }),
                    /*#__PURE__*/ _jsx("span", {
                        className: "font-medium text-foreground group-hover:text-primary transition-colors",
                        children: prev.title
                    })
                ]
            }) : /*#__PURE__*/ _jsx("div", {
                className: "flex-1"
            }),
            next ? /*#__PURE__*/ _jsxs(Link, {
                href: next.href,
                className: "group flex-1 flex flex-col items-end gap-1 p-4 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/30 transition-colors text-right",
                children: [
                    /*#__PURE__*/ _jsxs("span", {
                        className: "flex items-center gap-1 text-xs text-muted-foreground",
                        children: [
                            "Next",
                            /*#__PURE__*/ _jsx(ArrowRight, {
                                className: "h-3 w-3"
                            })
                        ]
                    }),
                    /*#__PURE__*/ _jsx("span", {
                        className: "font-medium text-foreground group-hover:text-primary transition-colors",
                        children: next.title
                    })
                ]
            }) : /*#__PURE__*/ _jsx("div", {
                className: "flex-1"
            })
        ]
    });
}
