'use client';

import * as React from 'react';
import PropTypes from 'prop-types';
import { Separator } from '../../separator/index.js';
import { useToolbarRootContext } from '../root/ToolbarRootContext.js';
/**
 * A separator element accessible to screen readers.
 * Renders a `<div>` element.
 *
 * Documentation: [Base UI Toolbar](https://base-ui.com/react/components/toolbar)
 */
import { jsx as _jsx } from "react/jsx-runtime";
const ToolbarSeparator = /*#__PURE__*/React.forwardRef(function ToolbarSeparator(props, forwardedRef) {
  const context = useToolbarRootContext();
  const orientation = {
    vertical: 'horizontal',
    horizontal: 'vertical'
  }[context.orientation];
  return /*#__PURE__*/_jsx(Separator, {
    orientation: orientation,
    ...props,
    ref: forwardedRef
  });
});
process.env.NODE_ENV !== "production" ? ToolbarSeparator.propTypes /* remove-proptypes */ = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * @ignore
   */
  children: PropTypes.node,
  /**
   * CSS class applied to the element, or a function that
   * returns a class based on the component’s state.
   */
  className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
  /**
   * Allows you to replace the component’s HTML element
   * with a different tag, or compose it with another component.
   *
   * Accepts a `ReactElement` or a function that returns the element to render.
   */
  render: PropTypes.oneOfType([PropTypes.element, PropTypes.func])
} : void 0;
export { ToolbarSeparator };