import{y as f,v as g,w as O,a3 as P,f as d,d_ as x,bP as D,s as y,t as F,X as L,z as N,P as S,Q as u,D as V,K as z}from"./index-BPRWoLf4.js";function K(e){var a=e.items,t=e.mode,i=e.style,n=e.direction,o=e.reverse,m=e.data,l=e.itemTitleSchema,h=e.className,R=e.timeClassName,v=e.titleClassName,p=e.detailClassName,C=e.render,_=function(s,r){return typeof r=="string"?z(r,m):r&&C(s,r)},b=(a||[]).map(function(s,r){var c=s.icon,T=s.iconClassName,A=s.title,E=s.timeClassName,j=s.titleClassName,w=s.detailClassName;return f(f({},s),{iconClassName:T,timeClassName:E,titleClassName:j,detailClassName:w,icon:g(c)?O(c,m,"| raw"):c,title:l?C("".concat(r,"/body"),l,{data:P(m,s)}):_("title",A)})});return d.createElement(x,{items:b,direction:n,reverse:o,mode:t,style:i,className:h,timeClassName:R,titleClassName:v,detailClassName:p})}var Q=D({adaptor:function(e){return e.items||e}})(function(e){y(a,e);function a(){return e!==null&&e.apply(this,arguments)||this}return a.prototype.render=function(){var t=this.props,i=t.config,n=t.items;t.deferLoad,t.loading,t.updateConfig;var o=F(t,["config","items","deferLoad","loading","updateConfig"]),m=i?Array.isArray(i)?i:Object.keys(i).map(function(l){return{time:l,title:i[l]}}):n||[];return d.createElement(K,f({items:m},o))},a}(d.Component)),W=function(e){y(a,e);function a(){var t=e!==null&&e.apply(this,arguments)||this;return t.remoteRef=void 0,t}return a.prototype.remoteConfigRef=function(t){this.remoteRef=t},a.prototype.componentDidUpdate=function(t){var i=this.props,n=i.source,o=i.data;this.remoteRef&&n!==t.source&&(g(n)&&this.remoteRef.syncConfig()||(L(n,o)?n.autoRefresh!==!1&&this.remoteRef.loadConfig():this.remoteRef.setConfig(void 0)))},a.prototype.render=function(){return d.createElement(Q,f({},this.props,{remoteConfigRef:this.remoteConfigRef}))},N([S,u("design:type",Function),u("design:paramtypes",[Object]),u("design:returntype",void 0)],a.prototype,"remoteConfigRef",null),a=N([V({type:"timeline"})],a),a}(d.Component);export{K as TimelineCmpt,W as TimelineRenderer};
