"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

exports.__esModule = true;
exports.default = void 0;

var _create = _interopRequireDefault(require("../utils/create"));

var _default = (0, _create.default)({
  render: function render() {
    var _vm = this;

    var _h = _vm.$createElement;

    var _c = _vm._self._c || _h;

    return _c('div', {
      class: [_vm.b({
        fixed: _vm.fixed
      }), {
        'vm-hairline-bottom': _vm.border
      }],
      style: _vm.style
    }, [_c('div', {
      class: _vm.b('action'),
      on: {
        "click": function click($event) {
          return _vm.$emit('click-left');
        }
      }
    }, [_vm._t("left", [_vm.leftArrow ? _c('icon', {
      class: _vm.b('angle-left'),
      attrs: {
        "name": "angle-left"
      }
    }) : _vm._e(), _vm.leftText ? _c('span', {
      domProps: {
        "textContent": _vm._s(_vm.leftText)
      }
    }) : _vm._e()])], 2), _c('div', {
      staticClass: "vm-ellipsis",
      class: _vm.b('title')
    }, [_vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2), _c('div', {
      class: _vm.b('action'),
      on: {
        "click": function click($event) {
          return _vm.$emit('click-right');
        }
      }
    }, [_vm._t("right", [_vm.rightText ? _c('span', {
      domProps: {
        "textContent": _vm._s(_vm.rightText)
      }
    }) : _vm._e()])], 2)]);
  },
  name: 'nav-bar',
  props: {
    title: String,
    fixed: Boolean,
    leftText: String,
    rightText: String,
    leftArrow: Boolean,
    border: {
      type: Boolean,
      default: true
    },
    zIndex: {
      type: Number,
      default: 1
    }
  },
  computed: {
    style: function style() {
      return {
        zIndex: this.zIndex
      };
    }
  }
});

exports.default = _default;