@codeperate/app-asset
Version:
Codeperate App Asset
26 lines (23 loc) • 922 B
JavaScript
import { r as registerInstance, h, H as Host, a as getElement } from './index-6dae2149.js';
import { m as mapStateToProps } from './map-state-to-props-86878b16.js';
const CdpMenuRematch = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.proxyHandler = {
set: (_target, prop, value, _receiver) => {
this.config.store.dispatch.CdpMenuModel.set({ [prop]: value });
return true;
},
};
}
componentWillLoad() {
mapStateToProps(this.config.store, this, (state) => ({
props: state.CdpMenuModel,
}));
}
render() {
return (h(Host, { class: "h-full block w-full" }, h("cdp-menu", { config: Object.assign(Object.assign({}, this.config.menuConfig), { proxyHandler: this.proxyHandler }), props: this.props }, h("slot", null))));
}
get rootEl() { return getElement(this); }
};
export { CdpMenuRematch as cdp_menu_rematch };