/*
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","../../core/object","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../support/OrderByInfo"],(function(e,r,o,t,n,s,i,c,u,a){"use strict";function d(e){return void 0!==e.orderBy}function l(e,r,o){if(!e)return null;const t=e.find((e=>!!e.field));if(!t)return null;const n=new a;return n.read(t,o),[n]}function p(e,r,o,n){const s=e.find((e=>!!e.field));s&&t.setDeepValue(o,[s.toJSON()],r)}const y=e=>{let t=function(e){function o(){var r;return(r=e.apply(this,arguments)||this).orderBy=null,r}return r._inheritsLoose(o,e),o}(e);return o.__decorate([n.property({type:[a],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l},write:{target:"layerDefinition.orderBy",writer:p}}})],t.prototype,"orderBy",void 0),t=o.__decorate([u.subclass("esri.layers.mixins.OrderedLayer")],t),t};e.OrderedLayer=y,e.isOrderedLayer=d,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
