/*
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 t from"./Accessor.js";import{setupConstructedDefaults as o}from"./accessorSupport/defaultsStoreUtils.js";import s from"./accessorSupport/MultiOriginStore.js";import{nameToId as e,idToName as i}from"./accessorSupport/PropertyOrigin.js";import{read as c}from"./accessorSupport/read.js";import{getProperties as n}from"./accessorSupport/utils.js";import{subclass as p}from"./accessorSupport/decorators/subclass.js";const u=t=>{const u=t;let m=class extends u{constructor(...r){super(...r);const t=n(this),e=t.store,i=new s;t.store=i,o(t,e,i)}read(r,t){c(this,r,t)}getAtOrigin(r,t){const o=f(this),s=e(t);if("string"==typeof r)return o.get(r,s);const i={};return r.forEach(r=>{i[r]=o.get(r,s)}),i}originOf(r){return i(this.originIdOf(r))}originIdOf(r){return f(this).originOf(r)}revert(r,t){const o=f(this),s=e(t),i=n(this);let c;c="string"==typeof r?"*"===r?o.keys(s):[r]:r,c.forEach(r=>{i.invalidate(r),o.revert(r,s),i.commit(r)})}};return m=r([p("esri.core.ReadOnlyMultiOriginJSONSupport")],m),m};function f(r){return n(r).store}const m=u(t);export{u as ReadOnlyMultiOriginJSONMixin,m as ReadOnlyMultiOriginJSONSupport};
