import "./Item.css";
/* script */
//
//
//
//
//
//
//
//
//
//
//
//
import { componentMixin, createComponentName } from '../_utils/component.js';
const __vue_script__ = {
  inject: ['waterfail'],
  name: createComponentName('waterfall-item'),
  mixins: [componentMixin],
  props: {
    transition: {
      type: String,
      default: 'waterfall-fade'
    }
  },

  data() {
    return {
      show: true,
      loaded: false
    };
  },

  mounted() {
    this.update();
  },

  beforeDestroy() {
    this.show = false;
  },

  destroyed() {
    this.waterfail.update();
  },

  methods: {
    async update() {
      await this.waterfail.update();
      this.show = false;
      setTimeout(() => {
        this.show = true;
        this.loaded = true;
      }, Math.random() * 100);
    }

  }
};
/* template */

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

  var _h = _vm.$createElement;

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

  return _c("transition", {
    attrs: {
      name: _vm.transition
    }
  }, [_c("div", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.show,
      expression: "show"
    }],
    class: _vm.bem({
      active: _vm.loaded
    }),
    style: _vm.loaded ? null : {
      visibility: "hidden"
    }
  }, [_vm._t("default")], 2)]);
};

var __vue_staticRenderFns__ = [];
__vue_render__._withStripped = true;
/* 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;
/* component normalizer */

import __vue_normalize__ from '../_utils/vue-normalize-component.js';
/* style inject */

/* style inject SSR */

export default __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);