import type { HTMLAttributes, ReactNode } from "react"; import { usePlatformLanguage } from "../i18n/LanguageContext"; import type { PlatformInterfaceIdentityProps } from "../types"; export type ActionToolbarDensity = "compact" | "default"; export type ActionToolbarSurface = "plain" | "subtle" | "panel-header" | "section-header"; export type ActionToolbarWrap = "responsive" | "always" | "never"; export type ActionToolbarJustify = "start" | "between" | "end"; export type ActionToolbarProps = PlatformInterfaceIdentityProps & Omit, "children"> & { children: ReactNode; label?: string; density?: ActionToolbarDensity; justify?: ActionToolbarJustify; surface?: ActionToolbarSurface; wrap?: ActionToolbarWrap; }; export default function ActionToolbar({ children, label, density = "default", justify = "start", surface = "plain", wrap = "responsive", className = "", role, "aria-label": ariaLabel, interfaceId, helpContextId, helpModuleId, helpTopicId, ...props }: ActionToolbarProps) { const { translateText } = usePlatformLanguage(); const translatedLabel = label || ariaLabel ? translateText(label ?? ariaLabel ?? "") : undefined; return (
{children}
); } export type ToolbarGroupProps = HTMLAttributes & { children: ReactNode; align?: "start" | "center" | "end"; grow?: boolean; }; export function ToolbarGroup({ children, align = "start", grow = false, className = "", ...props }: ToolbarGroupProps) { return (
{children}
); } export function ToolbarSpacer({ className = "", ...props }: HTMLAttributes) { return