import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import React from 'react';
import NavbarBody from './NavbarBody';
import NavbarHeader from './NavbarHeader';
import { useClassNames } from '../utils';
export var NavbarContext = /*#__PURE__*/React.createContext(null);
var defaultProps = {
  as: 'div',
  hasChildContext: true,
  classPrefix: 'navbar',
  appearance: 'default'
};
var Navbar = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var className = props.className,
      Component = props.as,
      hasChildContext = props.hasChildContext,
      classPrefix = props.classPrefix,
      appearance = props.appearance,
      rest = _objectWithoutPropertiesLoose(props, ["className", "as", "hasChildContext", "classPrefix", "appearance"]);

  var _useClassNames = useClassNames(classPrefix),
      withClassPrefix = _useClassNames.withClassPrefix,
      merge = _useClassNames.merge;

  var classes = merge(className, withClassPrefix(appearance));
  return /*#__PURE__*/React.createElement(NavbarContext.Provider, {
    value: hasChildContext
  }, /*#__PURE__*/React.createElement(Component, _extends({}, rest, {
    ref: ref,
    className: classes
  })));
});
Navbar.Header = NavbarHeader;
Navbar.Body = NavbarBody;
Navbar.displayName = 'Navbar';
Navbar.defaultProps = defaultProps;
export default Navbar;