---
import Base from "@layout/Base";
import ImageCarousel from "@component/detail/ImageCarousel";
import InfoView from "@component/detail/InfoView";
import StepView from "@component/detail/StepView";
import IngredientTableView from '@component/detail/IngredientTableView'
import { Recipe } from "@tmlmt/cooklang-parser";
import { authPB } from "@data/pb";
const { id } = Astro.params
const pb = await authPB()
const re = await pb.collection('recipes').getOne(id as string)
let recipeData = new Recipe(re.cooklang)
const images = await Promise.all(
re.images.map(r => pb.files.getURL(re, r).substring(21))
)
---