"use client"
import { z } from "zod"

import { getHeaderSchema } from "@/server/routers/contentstack/base/output"

import NavigationMenuItem from "../NavigationMenuItem"

import styles from "../navigationMenu.module.css"

export default function NavigationMenuList({
  isMobile,
  items,
}: {
  isMobile: boolean
  items: z.infer<typeof getHeaderSchema>["menuItems"]
}) {
  return (
    <ul
      className={`${styles.navigationMenu} ${isMobile ? styles.mobile : styles.desktop}`}
    >
      {items.map((item) => (
        <li key={item.title} className={styles.item}>
          <NavigationMenuItem isMobile={isMobile} item={item} />
        </li>
      ))}
    </ul>
  )
}
