"use strict";var _baseComponent=_interopRequireDefault(require("../helpers/baseComponent")),_classNames=_interopRequireDefault(require("../helpers/libs/classNames")),_useDOM=require("../helpers/hooks/useDOM");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)({relations:{"../index/index":{type:"parent"}},properties:{prefixCls:{type:String,value:"wux-index-item"},name:{type:String,value:""}},data:{index:0,top:0,height:0,brief:""},observers:_defineProperty({},"name, index, top, height",function(e,t){e=e?e.charAt(0):t,e!==this.data.brief&&this.setData({brief:e}),t=this.getIndexContext();t&&(0,t.getInternalHooks("INDEX_HOOK_MARK").updateChildren)()}),computed:{classes:["prefixCls",function(e){return{wrap:(0,_classNames.default)(e),hd:"".concat(e,"__hd"),bd:"".concat(e,"__bd")}}]},methods:{getIndexContext:function(){return this.getRelationsByName("../index/index")[0]},updated:function(t){var r=this;(0,_useDOM.useRect)(".".concat(this.data.prefixCls),this).then(function(e){e&&r.setData({top:e.top,height:e.height,index:t})})}}});