/*! bxs-vue-ui v3.3.0 */
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

require('../utils/entry-virtual.js');
var normalizeComponent = require('../utils/normalize-component.js');
require('../utils/object-create.js');
require('../utils/html.js');
require('../utils/es.number.constructor.js');
require('../utils/array-iteration.js');
require('../utils/sloppy-array-method.js');
var indexOf = require('../utils/index-of.js');
require('../utils/filter.js');
require('../utils/extends.js');
var index$1 = require('../utils/index.js');
require('../utils/some.js');
require('vue');
require('../utils/env.js');
require('../safe-area-patch/index.js');

var onlyValues = function onlyValues(values) {
  return function (str) {
    return indexOf._indexOfInstanceProperty(values).call(values, str) !== -1;
  };
};

var script = normalizeComponent.create({
  name: 'popup',
  mixins: [index$1.Popup],
  props: {
    position: {
      type: String,
      default: 'middle',
      validator: onlyValues(['top', 'left', 'bottom', 'right', 'middle'])
    },
    transition: String
  },
  computed: {
    currentTransition: function currentTransition() {
      var transitionName = this.transition;

      if (!transitionName) {
        transitionName = this.position === 'middle' ? 'bx-animate-fade' : "bx-popup-slide--" + this.position;
      }

      return transitionName;
    },
    currentClass: function currentClass() {
      return "bx-popup--" + this.position;
    }
  }
});

/* script */
var __vue_script__ = script;
/* template */

var __vue_render__ = function __vue_render__() {
  var _vm = this;

  var _h = _vm.$createElement;

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

  return _c('transition', {
    attrs: {
      "name": _vm.currentTransition
    }
  }, [_vm.value ? _c('div', {
    staticClass: "bx-popup",
    class: _vm.currentClass
  }, [_vm._t("default")], 2) : _vm._e()]);
};

var __vue_staticRenderFns__ = [];
/* style */

var __vue_inject_styles__ = undefined;
/* scoped */

var __vue_scope_id__ = undefined;
/* module identifier */

var __vue_module_identifier__ = undefined;
/* functional template */

var __vue_is_functional_template__ = false;
/* style inject */

/* style inject SSR */

var index = normalizeComponent.__vue_normalize__({
  render: __vue_render__,
  staticRenderFns: __vue_staticRenderFns__
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined);

exports.default = index;
