/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import { proxyExports as s } from "@arcgis/lumina/controllers";
import { AccessorController as i } from "@arcgis/lumina/controllers/accessor";
import { isEsriInternalEnv as n } from "@arcgis/toolkit/error";
import { V as p } from "./useView.js";
import { watch as m } from "@arcgis/core/core/reactiveUtils.js";
const v = (t, o) => (e) => a(e, t);
class r extends i {
  #o = void 0;
  constructor(o, e) {
    super(o, e), new p(this.component);
  }
  hostLoad() {
    this.#o = m(
      () => this.component.el.view,
      (o) => {
        this.instance.view = o, this.instance.map = o?.map;
      },
      { sync: !0, initial: !0 }
    );
  }
  hostDestroy() {
    this.#o?.remove(), super.hostDestroy();
  }
}
process.env.NODE_ENV !== "production" && n() && (r.devOnly$allowedPropNameMismatches = /* @__PURE__ */ new Set(["el", "manager", "open", "swipePosition"]));
const a = s(r);
export {
  v as m
};
