'use strict';

var React = require('react');
var useRenderElement = require('./useRenderElement-cjs.js');

function _interopNamespaceDefault(e) {
  var n = Object.create(null);
  if (e) {
    Object.keys(e).forEach(function (k) {
      if (k !== 'default') {
        var d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: function () { return e[k]; }
        });
      }
    });
  }
  n.default = e;
  return Object.freeze(n);
}

var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);

/**
 * A separator element accessible to screen readers.
 * Renders a `<div>` element.
 *
 * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)
 */
const Separator = /*#__PURE__*/React__namespace.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {
  const {
    className,
    render,
    orientation = 'horizontal',
    style,
    ...elementProps
  } = componentProps;
  const state = {
    orientation
  };
  const element = useRenderElement.useRenderElement('div', componentProps, {
    state,
    ref: forwardedRef,
    props: [{
      role: 'separator',
      'aria-orientation': orientation
    }, elementProps]
  });
  return element;
});
if (process.env.NODE_ENV !== "production") Separator.displayName = "Separator";

exports.Separator = Separator;
