"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/libs/classNames"));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,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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 r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(0,_baseComponent.default)({useFieldButton:!0,properties:{prefixCls:{type:String,value:"wux-button"},type:{type:String,value:"stable"},clear:{type:Boolean,value:!1},block:{type:Boolean,value:!1},full:{type:Boolean,value:!1},outline:{type:Boolean,value:!1},bordered:{type:Boolean,value:!0},shape:{type:String,value:"default"},size:{type:String,value:"default"},disabled:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},formType:{type:String,value:""},openType:{type:String,value:""},hoverClass:{type:String,value:"default"},hoverStopPropagation:{type:Boolean,value:!1},hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},lang:{type:String,value:"en"},sessionFrom:{type:String,value:""},sendMessageTitle:{type:String,value:""},sendMessagePath:{type:String,value:""},sendMessageImg:{type:String,value:""},showMessageCard:{type:Boolean,value:!1},appParameter:{type:String,value:""}},computed:{classes:["prefixCls, hoverClass, type, shape, size, block, full, clear, outline, bordered, disabled",function(e,t,r,n,o,i,a,l,u,p,s){var c=["rounded","rectangular"].includes(n)?n:"",y=["small","large"].includes(o)?o:"";return{wrap:(0,_classNames2.default)(e,_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"".concat(e,"--").concat(r),r),"".concat(e,"--").concat(n),c),"".concat(e,"--").concat(o),y),"".concat(e,"--block"),i),"".concat(e,"--full"),a),"".concat(e,"--clear"),l),"".concat(e,"--outline"),u),"".concat(e,"--bordered"),p),"".concat(e,"--disabled"),s)),hover:t&&"default"!==t?t:"".concat(e,"--hover")}}]},methods:{onTap:function(){this.data.disabled||this.data.loading||this.triggerEvent("click")},bindgetuserinfo:function(e){this.triggerEvent("getuserinfo",e.detail)},bindcontact:function(e){this.triggerEvent("contact",e.detail)},bindgetphonenumber:function(e){this.triggerEvent("getphonenumber",e.detail)},bindopensetting:function(e){this.triggerEvent("opensetting",e.detail)},bindlaunchapp:function(e){this.triggerEvent("launchapp",e.detail)},bindchooseavatar:function(e){this.triggerEvent("chooseavatar",e.detail)},onError:function(e){this.triggerEvent("error",e.detail)}}});