/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as r}from"tslib";import{setDeepValue as e}from"../../core/object.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import n from"../support/OrderByInfo.js";function i(r,e,o){if(!r)return null;const t=r.find(r=>!!r.field);if(!t)return null;const i=new n;return i.read(t,o),[i]}function s(r,o,t,n){const i=r.find(r=>!!r.field);i&&e(t,[i.toJSON()],o)}const c={type:[n],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:i},write:{writer:s}}},d=e=>{const n=e;let i=class extends n{constructor(){super(...arguments),this.orderBy=null}};return r([o(c)],i.prototype,"orderBy",void 0),i=r([t("esri.layers.mixins.OrderedLayer")],i),i};export{d as OrderedLayer,c as orderByProperty,i as readOrderByInfos,s as writeOrderByInfos};
