import type { GetStaticPaths, GetStaticProps, InferGetStaticPropsType } from 'next'

import { productGetStaticPathsHelper, productGetStaticPropsHelper } from '@/lib/getStaticHelpers'

import ProductTemplate from '@/components/templates/Product'

export default function Packaging({ page }: InferGetStaticPropsType<typeof getStaticProps>) {
  return <ProductTemplate page={page} />
}

export const getStaticProps: GetStaticProps = async context => {
  return await productGetStaticPropsHelper(context, 'packaging/')
}

export const getStaticPaths: GetStaticPaths = async context => {
  return await productGetStaticPathsHelper(context)
}
