/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as o}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as e,subclass as s}from"../../core/accessorSupport/decorators.js";import{fromJSON as i}from"./domains.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";let a=class extends(r(t)){constructor(o){super(o),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(o){if(!o)return null;const r={};for(const t of Object.keys(o))r[t]=i(o[t]);return r}writeDomains(o,r){if(!o)return;const t={};for(const e of Object.keys(o))o[e]&&(t[e]=o[e]?.toJSON());r.domains=t}};o([e({type:Number,json:{write:!0}})],a.prototype,"code",void 0),o([e({type:Object,json:{write:!0}})],a.prototype,"defaultValues",void 0),o([e({json:{write:!0}})],a.prototype,"domains",void 0),o([p("domains")],a.prototype,"readDomains",null),o([n("domains")],a.prototype,"writeDomains",null),o([e({type:String,json:{write:!0}})],a.prototype,"name",void 0),a=o([s("esri.layers.support.Subtype")],a);export{a as default};
