import _extends from "@babel/runtime/helpers/esm/extends";
import create from "../utils/create"; // Mixins

import popupMixin from "../mixins/popup"; // Components

import Popup from "../popup";
export default create({
  render: function render() {
    var _vm = this;

    var _h = _vm.$createElement;

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

    return _c('Popup', {
      class: [_vm.b([_vm.type]), _vm.className],
      style: _vm.style,
      attrs: {
        "value": _vm.value,
        "position": "top",
        "overlay": false,
        "duration": _vm.duration,
        "lockScroll": false
      },
      on: {
        "open": function open($event) {
          return _vm.onOpen('open');
        },
        "opened": function opened($event) {
          return _vm.onOpen('opened');
        },
        "close": function close($event) {
          return _vm.onOpen('close');
        }
      }
    }, [_vm._t("default", [_vm._v("\n    " + _vm._s(_vm.message) + "\n  ")])], 2);
  },
  components: {
    Popup: Popup
  },
  name: "notify",
  props: _extends({}, popupMixin.props, {
    color: String,
    message: [Number, String],
    duration: [Number, String],
    className: String,
    background: String,
    getContainer: [String, Function],
    type: {
      type: String,
      default: "danger"
    }
  }),
  methods: {
    onOpen: function onOpen(name) {
      this.$emit(name);
    }
  },
  computed: {
    style: function style() {
      return {
        color: this.color,
        background: this.background
      };
    }
  }
});