"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames2=_interopRequireDefault(require("../helpers/libs/classNames")),_useNativeRoute=require("../helpers/hooks/useNativeRoute");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,i){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,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 i=e[Symbol.toPrimitive];if(void 0===i)return("string"===t?String:Number)(e);i=i.call(e,t||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}(0,_baseComponent.default)({properties:{prefixCls:{type:String,value:"wux-footer"},theme:{type:String,value:"balanced"},label:{type:String,value:""},content:{type:String,value:""},links:{type:Array,value:[]},chips:{type:Array,value:[]}},computed:{classes:["prefixCls, theme",function(e,t){return{wrap:(0,_classNames2.default)(e,_defineProperty({},"".concat(e,"--").concat(t),t)),label:"".concat(e,"__label"),content:"".concat(e,"__content"),links:"".concat(e,"__links"),link:"".concat(e,"__link"),chips:"".concat(e,"__chips"),chip:"".concat(e,"__chip")}}]},methods:{clickLinkItem:function(e){var e=e.target.dataset.index,t=this.data.links[e];t&&(void 0!==t.url&&(0,_useNativeRoute.useNativeRoute)({url:t.url,openType:t.openType,delta:t.delta},this),this.triggerEvent("linkClick",{item:t,index:e}))},clickChipItem:function(e){var e=e.target.dataset.index,t=this.data.chips[e];t&&"link"===t.type&&this.triggerEvent("chipClick",{item:t,index:e})}}});