"use client" import { DocsEditMenu, type DocsEditMenuActions, type DocsEditMenuState } from "@/components/drive/richtext/docs-edit-menu" import { DocsFileMenu, type DocsFileMenuActions } from "@/components/drive/richtext/docs-file-menu" import { DOCS_MENUBAR_CONTENT_PROPS } from "@/components/drive/richtext/docs-menubar-props" 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 OTHER_MENU_LABELS = [ "Affichage", "Insertion", "Format", "Outils", "Aide", ] as const export function DocsMenubar({ pageFormatId, onPageFormatChange, zoom, onZoomChange, fileMenuActions, fileMenuDisabled, editMenuActions, editMenuState, editMenuDisabled, className, }: { pageFormatId: PageFormatId onPageFormatChange: (id: PageFormatId) => void zoom: number onZoomChange: (zoom: number) => void fileMenuActions?: DocsFileMenuActions fileMenuDisabled?: boolean editMenuActions?: DocsEditMenuActions editMenuState?: DocsEditMenuState editMenuDisabled?: boolean className?: string }) { return ( {fileMenuActions ? ( ) : ( Fichier Bientôt disponible )} {editMenuActions && editMenuState ? ( ) : ( Édition Bientôt disponible )} {OTHER_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 ) })}
) }