function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
import { extend, mergeData } from '../../vue';
import { NAME_NAV } from '../../constants/components';
import { PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../constants/props';
import { makeProp, makePropsConfigurable } from '../../utils/props';

// --- Helper methods ---

var computeJustifyContent = function computeJustifyContent(value) {
  value = value === 'left' ? 'start' : value === 'right' ? 'end' : value;
  return "justify-content-".concat(value);
};

// --- Props ---

export var props = makePropsConfigurable({
  align: makeProp(PROP_TYPE_STRING),
  // Set to `true` if placing in a card header
  cardHeader: makeProp(PROP_TYPE_BOOLEAN, false),
  fill: makeProp(PROP_TYPE_BOOLEAN, false),
  justified: makeProp(PROP_TYPE_BOOLEAN, false),
  pills: makeProp(PROP_TYPE_BOOLEAN, false),
  small: makeProp(PROP_TYPE_BOOLEAN, false),
  tabs: makeProp(PROP_TYPE_BOOLEAN, false),
  tag: makeProp(PROP_TYPE_STRING, 'ul'),
  vertical: makeProp(PROP_TYPE_BOOLEAN, false)
}, NAME_NAV);

// --- Main component ---

// @vue/component
export var BNav = /*#__PURE__*/extend({
  name: NAME_NAV,
  functional: true,
  props: props,
  render: function render(h, _ref) {
    var props = _ref.props,
      data = _ref.data,
      children = _ref.children;
    var tabs = props.tabs,
      pills = props.pills,
      vertical = props.vertical,
      align = props.align,
      cardHeader = props.cardHeader;
    return h(props.tag, mergeData(data, {
      staticClass: 'nav',
      class: _defineProperty(_defineProperty({
        'nav-tabs': tabs,
        'nav-pills': pills && !tabs,
        'card-header-tabs': !vertical && cardHeader && tabs,
        'card-header-pills': !vertical && cardHeader && pills && !tabs,
        'flex-column': vertical,
        'nav-fill': !vertical && props.fill,
        'nav-justified': !vertical && props.justified
      }, computeJustifyContent(align), !vertical && align), "small", props.small)
    }), children);
  }
});