import { fH as r, _ as l, ad as o, I as d, a4 as a, ag as h, fI as p, e5 as c, X as m, bX as s, w as u, a9 as v, fJ as g, ar as C } from "./56c67d3b.js";
import "react";
import "react-dom";
const I = [C], V = {
  label: m,
  hidden: s,
  active: s,
  onEvent: u(v(I), [{
    // name: "click",
    name: "click",
    handler: {
      compType: "openAppPage"
    }
  }])
};
class b 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, {
      ...V,
      items: w()
    });
  }
  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 w() {
  const n = g(b);
  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 {
  b as NavItemComp,
  w as navListComp
};
