/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../TimeExtent","../../TimeInterval","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/reader","../../core/accessorSupport/decorators/subclass","../support/fieldUtils","../support/TimeInfo","../../portal/timeUnitKebabDictionary"],(function(e,t,r,o,i,s,n,a,p,c,l,u,f,m){"use strict";function d(e){return void 0!==e.timeInfo}const y=e=>{let n=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).timeExtent=null,t.timeOffset=null,t.useViewTime=!0,t}return t._inheritsLoose(r,e),r.prototype.readOffset=function(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const o=r.timeOffset,s=m.timeUnitKebabDictionary.fromJSON(r.timeOffsetUnits);return o&&s?new i({value:o,unit:s}):null},t._createClass(r,[{key:"timeInfo",set:function(e){u.fixTimeInfoFields(e,this.fieldsIndex),this._set("timeInfo",e)}}]),r}(e);return r.__decorate([s.property({type:o,json:{write:!1}})],n.prototype,"timeExtent",void 0),r.__decorate([s.property({type:i})],n.prototype,"timeOffset",void 0),r.__decorate([c.reader("service","timeOffset",["timeInfo.exportOptions"])],n.prototype,"readOffset",null),r.__decorate([s.property({value:null,type:f,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"timeInfo",null),r.__decorate([s.property({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],n.prototype,"useViewTime",void 0),n=r.__decorate([l.subclass("esri.layers.mixins.TemporalLayer")],n),n};e.TemporalLayer=y,e.isTemporalLayer=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
