/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{AFlowResources as s}from"./AFlowResources.js";class t{constructor(s){this._styles=s,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._styles.reduce((s,t)=>s||t.animated,!1)}isCompatible(s){if(!(s instanceof t))return!1;if(this._styles.length!==s._styles.length)return!1;const e=this._styles.length;for(let t=0;t<e;t++)if(!this._styles[t].isCompatible(s._styles[t]))return!1;return!0}updateResource(s){const t=Math.min(this._styles.length,s.resources.length);for(let e=0;e<t;e++)this._styles[e].updateResource(s.resources[e])}async load(s,t,r){const o=await Promise.all(this._styles.map(t=>t.load(s,null,r)));return new e(o,s,[])}}class e extends s{constructor(s,t,e){super(t,e,null),this.resources=s,this.kind="stack"}attach(s){for(const t of this.resources)t.attach(s)}detach(){for(const s of this.resources)s.detach()}get ready(){return this.resources.reduce((s,t)=>s&&t.ready,!0)}}export{t as Stack,e as StackResources};
