import { fw as r, _ as l, a6 as o, G as d, Y as a, a9 as h, fx as p, dV as c, S as m, bI as s, w as u, a2 as v, fy as g, ak as C } from "./603b75d9.js";
import "react";
import "react-dom";
const V = [C], w = {
  label: m,
  hidden: s,
  active: s,
  onEvent: u(v(V), [{
    // name: "click",
    name: "click",
    handler: {
      compType: "openAppPage"
    }
  }])
};
class I extends r {
  getView() {
    return l.mapValues(this.children, (e) => e.getView());
  }
  getPropertyView() {
    return /* @__PURE__ */ o(d, {
      children: [this.children.label.propertyView({
        label: a("label")
      }), h(this.children), this.children.active.propertyView({
        label: a("navItemComp.active")
      }), this.children.onEvent.propertyView({
        inline: !0
      })]
    });
  }
  parseChildrenFromValue(e) {
    return p(e, {
      ...w,
      items: b()
    });
  }
  ignoreChildDefaultValue() {
    return !0;
  }
  addSubItem(e) {
    this.children.items.addItem(e);
  }
  exposingNode() {
    return c({
      label: this.children.label.exposingNode(),
      hidden: this.children.hidden.exposingNode(),
      active: this.children.active.exposingNode(),
      items: this.children.items.exposingNode()
    });
  }
}
function b() {
  const n = g(I);
  return class extends n {
    addItem(t) {
      const i = this.getView();
      this.dispatch(this.pushAction(t || {
        label: a("menuItem") + " " + (i.length + 1)
      }));
    }
    deleteItem(t) {
      this.dispatch(this.deleteAction(t));
    }
    moveItem(t, i) {
      this.dispatch(this.arrayMoveAction(t, i));
    }
  };
}
export {
  I as NavItemComp,
  b as navListComp
};
