import PrimaryCanvasContainer from "./primary-canvas-container.mjs";

/**
 * A lightweight primary-canvas container designed for particle effects.
 * This container intentionally avoids any internal sorting or depth participation. Children render in insertion order.
 */
export default class PrimaryCanvasParticleContainer extends PrimaryCanvasContainer {
  constructor(...args) {
    super(...args);

    // Particles are noninteractive
    this.eventMode = "none";
    this.interactiveChildren = false;

    // Particles are not sorted
    this.sortableChildren = false;
  }

  /* -------------------------------------------- */

  /** @override */
  _onAddedPrimary() {
    this._inPrimary = true;

    // Do not propagate this event because particles are not PCOs
  }

  /* -------------------------------------------- */

  /** @override */
  _onRemovedPrimary() {
    this._inPrimary = false;

    // Do not propagate this event because particles are not PCOs
  }

  /* -------------------------------------------- */

  /** @override */
  _onElevationChange() {
    // Do not propagate elevation because particles are not PCOs
  }

  /* -------------------------------------------- */

  /** @override */
  _shouldRenderDepth() {
    return false; // Particles are not depth renderable
  }
}
