"use client" import { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarTrigger, } from "@/components/ui/menubar" import { PAGE_FORMATS, type PageFormatId } from "@/lib/drive/page-formats" import { cn } from "@/lib/utils" const MENU_LABELS = [ "Fichier", "Édition", "Affichage", "Insertion", "Format", "Outils", "Aide", ] as const export function DocsMenubar({ pageFormatId, onPageFormatChange, zoom, onZoomChange, className, }: { pageFormatId: PageFormatId onPageFormatChange: (id: PageFormatId) => void zoom: number onZoomChange: (zoom: number) => void className?: string }) { return ( {MENU_LABELS.map((label) => { if (label === "Affichage") { return ( {label} Mode (bientôt)
Taille de page
{PAGE_FORMATS.map((format) => ( onPageFormatChange(format.id)} className={cn(pageFormatId === format.id && "bg-accent")} > {format.label} {format.widthMm} × {format.heightMm} mm ))}
Zoom
{[50, 75, 100, 125, 150, 200].map((value) => ( onZoomChange(value)} className={cn(zoom === value && "bg-accent")} > {value}% ))}
) } return ( {label} Bientôt disponible ) })}
) }