"use strict";const t=require("../../../../../common/vendor.js"),h=require("../js/z-paging-static.js"),n=require("../js/z-paging-utils.js"),u=require("../js/z-paging-enum.js"),l={name:"z-paging-refresh",data(){return{R:u.Enum.Refresher,isIos:t.index.getSystemInfoSync().platform==="ios",refresherTimeText:"",zTheme:{title:{white:"#efefef",black:"#555555"},arrow:{white:h.zStatic.base64ArrowWhite,black:h.zStatic.base64Arrow},flower:{white:h.zStatic.base64FlowerWhite,black:h.zStatic.base64Flower},success:{white:h.zStatic.base64SuccessWhite,black:h.zStatic.base64Success},indicator:{white:"#eeeeee",black:"#777777"}}}},props:["status","defaultThemeStyle","defaultText","pullingText","refreshingText","completeText","goF2Text","defaultImg","pullingImg","refreshingImg","completeImg","refreshingAnimated","showUpdateTime","updateTimeKey","imgStyle","titleStyle","updateTimeStyle","updateTimeTextMap","unit"],computed:{ts(){return this.defaultThemeStyle},statusTextArr(){return this.updateTime(),[this.defaultText,this.pullingText,this.refreshingText,this.completeText,this.goF2Text]},currentTitle(){return this.statusTextArr[this.status]||this.defaultText},leftImageClass(){const e=`zp-r-left-image-pre-size-${this.unit}`;return this.status===this.R.Complete?e:`zp-r-left-image ${e} ${this.status===this.R.Default?"zp-r-arrow-down":"zp-r-arrow-top"}`},leftImageStyle(){const e=this.showUpdateTime,s=e?n.u.addUnit(36,this.unit):n.u.addUnit(34,this.unit);return{width:s,height:s,"margin-right":e?n.u.addUnit(20,this.unit):n.u.addUnit(9,this.unit)}},leftImageSrc(){const e=this.R,s=this.status;return s===e.Default?this.defaultImg?this.defaultImg:this.zTheme.arrow[this.ts]:s===e.ReleaseToRefresh?this.pullingImg?this.pullingImg:this.defaultImg?this.defaultImg:this.zTheme.arrow[this.ts]:s===e.Loading?this.refreshingImg?this.refreshingImg:this.zTheme.flower[this.ts]:s===e.Complete?this.completeImg?this.completeImg:this.zTheme.success[this.ts]:s===e.GoF2?this.zTheme.arrow[this.ts]:""},rightTextStyle(){let e={};return e.color=this.zTheme.title[this.ts],e["font-size"]=n.u.addUnit(30,this.unit),e}},methods:{addUnit(e,s){return n.u.addUnit(e,s)},updateTime(){this.showUpdateTime&&(this.refresherTimeText=n.u.getRefesrherFormatTimeByKey(this.updateTimeKey,this.updateTimeTextMap))}}};function m(e,s,i,c,a,r){return t.e({a:i.status!==a.R.Loading},i.status!==a.R.Loading?{b:t.n(r.leftImageClass),c:t.s(r.leftImageStyle),d:t.s(i.imgStyle),e:r.leftImageSrc}:{f:i.refreshingAnimated?1:"",g:i.unit==="rpx"?1:"",h:i.unit==="px"?1:"",i:t.s(r.leftImageStyle),j:t.s(i.imgStyle),k:r.leftImageSrc},{l:t.t(r.currentTitle),m:t.s(r.rightTextStyle),n:t.s(i.titleStyle),o:i.showUpdateTime&&a.refresherTimeText.length},i.showUpdateTime&&a.refresherTimeText.length?{p:t.t(a.refresherTimeText),q:i.unit==="rpx"?1:"",r:i.unit==="px"?1:"",s:t.s({color:a.zTheme.title[r.ts]}),t:t.s(i.updateTimeStyle)}:{},{v:t.n(i.showUpdateTime?"zp-r-container zp-r-container-padding":"zp-r-container")})}const g=t._export_sfc(l,[["render",m],["__scopeId","data-v-00a16504"]]);wx.createComponent(g);
