import { fC as r, c1 as l, P as o, bh as d, a0 as s, bl as h, fD as c, dX as p, ba as m, bd as a, w as u, bL as v, fE as C, cw as b } from "./684d2f28.js";
import "react";
import "react-dom";
const g = [b], V = {
  label: m,
  hidden: a,
  active: a,
  onEvent: u(v(g), [{
    // name: "click",
    name: "click",
    handler: {
      compType: "openAppPage"
    }
  }])
};
class w extends r {
  getView() {
    return l.mapValues(this.children, (e) => e.getView());
  }
  getPropertyView() {
    return /* @__PURE__ */ o(d, {
      children: [this.children.label.propertyView({
        label: s("label")
      }), h(this.children), this.children.active.propertyView({
        label: s("navItemComp.active")
      }), this.children.onEvent.propertyView({
        inline: !0
      })]
    });
  }
  parseChildrenFromValue(e) {
    return c(e, {
      ...V,
      items: I()
    });
  }
  ignoreChildDefaultValue() {
    return !0;
  }
  addSubItem(e) {
    this.children.items.addItem(e);
  }
  exposingNode() {
    return p({
      label: this.children.label.exposingNode(),
      hidden: this.children.hidden.exposingNode(),
      active: this.children.active.exposingNode(),
      items: this.children.items.exposingNode()
    });
  }
}
function I() {
  const n = C(w);
  return class extends n {
    addItem(t) {
      const i = this.getView();
      this.dispatch(this.pushAction(t || {
        label: s("menuItem") + " " + (i.length + 1)
      }));
    }
    deleteItem(t) {
      this.dispatch(this.deleteAction(t));
    }
    moveItem(t, i) {
      this.dispatch(this.arrayMoveAction(t, i));
    }
  };
}
export {
  w as NavItemComp,
  I as navListComp
};
