this repo has no description
1import type { AppPanels as AppPanelsType } from "@moonlight-mod/types/coreExtensions/appPanels";
2import React from "@moonlight-mod/wp/react";
3
4const panels: Record<string, React.FC<any>> = {};
5
6export const AppPanels: AppPanelsType = {
7 addPanel(section, element) {
8 panels[section] = element;
9 },
10 getPanels(panel) {
11 return Object.entries(panels).map(([section, element]) =>
12 React.createElement(
13 panel,
14 {
15 section
16 },
17 React.createElement(element)
18 )
19 );
20 }
21};
22
23export default AppPanels;