/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
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{idToName as i,nameToId as e}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 a=class extends u{constructor(...r){super(...r);const t=n(this),i=t.store,e=new s;t.store=e,o(t,i,e)}read(r,t){c(this,r,t)}getAtOrigin(r,t){const o=m(this),s=e(t);return o.get(r,s)}originOf(r){return i(this.originIdOf(r))}originIdOf(r){return m(this).originOf(r)}revertToOrigin(r,t){const o=m(this),s=e(t),i=n(this);"*"===r&&o.keys(s).forEach(r=>this.revertToOrigin(r,t)),i.invalidate(r),o.revert(r,s),i.commit(r)}revertAllToOrigin(r){const t=m(this),o=e(r);t.keys(o).forEach(t=>this.revertToOrigin(t,r))}};return a=r([p("esri.core.ReadOnlyMultiOriginJSONSupport")],a),a};function m(r){return n(r).store}const a=u(t);export{a as ReadOnlyMultiOriginJSONSupport,u as ReadOnlyMultiOriginJSONSupportMixin};
