"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent"));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:String(t)}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}(0,_baseComponent.default)({useExport:!0,properties:{prefixCls:{type:String,value:"wux-backdrop"},transparent:{type:Boolean,value:!1},zIndex:{type:Number,value:1e3},classNames:{type:null,value:"wux-animate--fadeIn"},mountOnEnter:{type:Boolean,value:!0},unmountOnExit:{type:Boolean,value:!0},visible:{type:Boolean,value:!1,observer:function(t){this.setActive(t),t||(this._backdropHolds=0)}}},data:{active:!1},computed:{classes:["prefixCls, transparent",function(t,e){return{wrap:e?"".concat(t,"--transparent"):t,bd:"".concat(t,"__bd"),btn:"".concat(t,"__aria-btn")}}]},methods:_defineProperty({setActive:function(t){this.data.active!==t&&this.setData({active:t})},onEntered:function(){this.triggerEvent("showed")},onExited:function(){this.triggerEvent("closed")},onClick:function(){this.triggerEvent("click")},noop:function(){}},"export",function(){var t=this,e=this;return{retain:function(){"number"==typeof t._backdropHolds&&t._backdropHolds||(t._backdropHolds=0),t._backdropHolds=t._backdropHolds+1,1===t._backdropHolds&&t.setActive(!0)},release:function(){1===t._backdropHolds&&t.setActive(!1),t._backdropHolds=Math.max(0,t._backdropHolds-1)},get backdropHolds(){return e._backdropHolds||0}}}),attached:function(){var t=this.data.visible;this.setActive(t)}});