import { usePage } from "@inertiajs/react"; import duckJpg from "&/images/normes/elevage-canard.jpg"; import duckWebp from "&/images/normes/elevage-canard.webp"; import turkeyJpg from "&/images/normes/elevage-dinde.jpg"; import turkeyWebp from "&/images/normes/elevage-dinde.webp"; import chickenJpg from "&/images/normes/elevage-poulet.jpg"; import chickenWebp from "&/images/normes/elevage-poulet.webp"; import vectorImg from "&/images/vectors/poulet.svg"; import useTrans from "@/hooks/use-translations"; import { GetTranslation } from "@/lib/utils"; const NORM_KEYS = [ "livingSpace", "enrichments", "outdoorAccess", "feeding", "rearingDuration", "operation", "externalControls", ] as const; interface NormCardProps { titleKey: string; speciesKey: string; webp: string; fallback: string; altImg: string; titleImg: string; downloadLabelKey: string; downloadUrl: string; imagePosition: "left" | "right"; } function NormCard({ titleKey, speciesKey, webp, fallback, altImg, titleImg, downloadLabelKey, downloadUrl, imagePosition, }: Readonly) { return (
{useTrans(altImg)}

{useTrans(titleKey)}

    {NORM_KEYS.map((key) => (
  • {GetTranslation(`norms.labels.${key}`)} :{" "} {GetTranslation(`norms.${speciesKey}.texts.${key}`)}
  • ))}
{useTrans(downloadLabelKey)}
); } export default function NormsSection() { const { appEnv } = usePage().props as unknown as { appEnv: { locale: string }; }; const documentUrl = (filename: string) => `/documents/${appEnv.locale}/${filename}`; return (

{useTrans("norms.title")}

{useTrans("norms.subtitle")}

{GetTranslation("norms.title_2")}

{GetTranslation("norms.subtitle_2")}

{GetTranslation("norms.cta_label")}
); }