// // Copyright 2023 DXOS.org // import type { ToggleGroupItemProps as ToggleGroupItemPrimitiveProps } from '@radix-ui/react-toggle-group'; import * as ToolbarPrimitive from '@radix-ui/react-toolbar'; import React, { forwardRef } from 'react'; import { useThemeContext } from '../../hooks'; import { type ThemedClassName } from '../../util'; import { Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Toggle, type ToggleGroupItemProps, type ToggleProps, IconButton, type IconButtonProps, } from '../Buttons'; import { Link, type LinkProps } from '../Link'; import { Separator, type SeparatorProps } from '../Separator'; type ToolbarRootProps = ThemedClassName & { layoutManaged?: boolean }; const ToolbarRoot = forwardRef( ({ classNames, children, layoutManaged, ...props }, forwardedRef) => { const { tx } = useThemeContext(); return ( {children} ); }, ); type ToolbarButtonProps = ButtonProps; const ToolbarButton = forwardRef((props, forwardedRef) => { return (