"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames3=_interopRequireDefault(require("../helpers/libs/classNames")),_styleToCssString=_interopRequireDefault(require("../helpers/libs/styleToCssString"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-card"},hoverClass:{type:String,value:"none"},bordered:{type:Boolean,value:!0},full:{type:Boolean,value:!1},title:{type:String,value:""},thumb:{type:String,value:""},thumbStyle:{type:[String,Object],value:"",observer:function(e){this.setData({extStyle:(0,_styleToCssString.default)(e)})}},extra:{type:String,value:""},actions:{type:Array,value:[]}},data:{extStyle:"",disabled:!1},computed:{classes:["prefixCls, hoverClass, bordered, full, actions",function(t,e,o,r,n){return{wrap:(0,_classNames3.default)(t,_defineProperty(_defineProperty(_defineProperty({},"".concat(t,"--bordered"),o),"".concat(t,"--full"),r),"".concat(t,"--has-actions"),0<n.length)),hd:"".concat(t,"__hd"),content:"".concat(t,"__content"),thumb:"".concat(t,"__thumb"),extra:"".concat(t,"__extra"),bd:"".concat(t,"__bd"),ft:"".concat(t,"__ft"),actions:"".concat(t,"__actions"),action:n.map(function(e){return{wrap:(0,_classNames3.default)("".concat(t,"__action"),_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"".concat(t,"__action--").concat(e.type||"default"),e.type||"default"),"".concat(t,"__action--bold"),e.bold),"".concat(t,"__action--disabled"),e.disabled),"".concat(e.className),e.className)),hover:e.hoverClass&&"default"!==e.hoverClass?e.hoverClass:"".concat(t,"__action--hover")}}),hover:e&&"default"!==e?e:"".concat(t,"--hover")}}]},methods:{onAction:function(e){var e=e.currentTarget.dataset.index,t=this.data.actions,o=t[e];o.disabled||this.triggerEvent("action",{index:e,action:o,actions:t})}}});