'use strict';

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

var normalizeComponent = require('./normalize-component-6fa50395.js');
var ThemeMixin = require('./ThemeMixin-a2f817cd.js');
var svgAtom = require('./svg-atom-d2541b7d.js');

var ICONS_BY_SKIN = {
  warning: 'circle-warning',
  error: 'circle-minus',
  success: 'circle-mark',
  time: 'circle-time'
};
var script = {
  name: 'VSnackbar',
  props: {
    skin: {
      type: String,
      default: 'none',
      validator: function validator(value) {
        return ['none', 'warning', 'error', 'success', 'time'].includes(value);
      }
    },
    isMultiLine: {
      type: Boolean,
      default: false
    }
  },
  computed: {
    icon: function icon() {
      return ICONS_BY_SKIN[this.skin];
    },
    cssClasses: function cssClasses() {
      return ThemeMixin._objectSpread2(ThemeMixin._objectSpread2({}, this.themeCssClass), {}, ThemeMixin._defineProperty({
        'is-multiline': this.isMultiLine
      }, "skin-".concat(this.skin), true));
    }
  },
  methods: {
    onClose: function onClose() {
      this.$emit('close');
    }
  },
  mixins: [ThemeMixin.ThemeMixin],
  components: {
    SvgAtom: svgAtom.SvgAtom
  }
};

/* script */
const __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"v-snackbar",class:_vm.cssClasses},[_c('div',{staticClass:"v-snackbar-container"},[(_vm.icon)?_c('div',{staticClass:"v-snackbar-icon"},[_c('svg-atom',{attrs:{"width":"16px","height":"16px","name":_vm.icon}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"v-snackbar-content"},[_vm._t("default")],2),_vm._v(" "),(!_vm.isMultiLine)?_c('div',{staticClass:"v-snackbar-controls"},[_vm._t("control")],2):_vm._e(),_vm._v(" "),_c('div',{staticClass:"v-snackbar-close"},[_c('button',{staticClass:"v-snackbar-close-button",on:{"click":_vm.onClose}},[_c('svg-atom',{attrs:{"name":"close","width":"10px","height":"10px"}})],1)])]),_vm._v(" "),(_vm.isMultiLine)?_c('div',{staticClass:"v-snackbar-controls"},[_vm._t("control")],2):_vm._e()])};
var __vue_staticRenderFns__ = [];

  /* style */
  const __vue_inject_styles__ = undefined;
  /* scoped */
  const __vue_scope_id__ = undefined;
  /* module identifier */
  const __vue_module_identifier__ = undefined;
  /* functional template */
  const __vue_is_functional_template__ = false;
  /* style inject */
  
  /* style inject SSR */
  

  
  var VSnackbar = 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 = VSnackbar;
