import { Framework, NamespacedId, NavigationItem, PortalMeta, RouteDefinition } from "@lumeweb/portal-framework-core"; //#region src/store/appStore.d.ts interface AppActions { addMenuItem: (item: NavigationItem, parentKey?: NamespacedId) => void; addMenuItems: (items: NavigationItem[], parentKey?: NamespacedId) => void; removeMenuItem: (key: NamespacedId) => void; setError: (error: Error | null) => void; setFramework: (framework: Framework) => void; setIsLoading: (isLoading: boolean) => void; setIsMetaLoading: (isMetaLoading: boolean) => void; setMenuItems: (items: NavigationItem[]) => void; setMeta: (meta: PortalMeta | undefined) => void; setPluginConfigs: (configs: Record[]) => void; setPortalUrl: (portalUrl: string) => void; setRoutes: (routes: RouteDefinition[]) => void; setSdk: (sdk: any) => void; syncFromFramework: () => Promise; } interface AppState { error: Error | null; framework: Framework | null; isLoading: boolean; isMetaLoading: boolean; menuItems: NavigationItem[]; meta?: PortalMeta; pluginConfigs: Record[]; portalUrl: string; routes: RouteDefinition[]; sdk: any; } declare const helpers: { /** * Adds new items as children to a parent menu item, replacing any child with * the same ID. * @param newItems The array of NavigationItems to add. * @param parent The parent NavigationItem to add the items to. * @returns A new parent item with the new items added or replaced as children. */ addItemsToChildren: (newItems: NavigationItem[], parent: NavigationItem) => NavigationItem; /** * Adds new items to the root level of the menu, replacing any existing item * with the same ID. * @param newItems The array of NavigationItems to add. * @param existingItems The existing array of NavigationItems. * @returns a new array with the new items added or replaced. */ addItemsToRoot: (newItems: NavigationItem[], existingItems: NavigationItem[]) => NavigationItem[]; findAndModifyMenuItem: (items: NavigationItem[], key: NamespacedId, modifier: (item: NavigationItem) => NavigationItem) => NavigationItem[]; /** * Finds a menu item by its ID in a flat or nested menu structure. * @param items The array of NavigationItems to search. * @param id The ID of the item to find. * @returns The NavigationItem if found, otherwise undefined. */ findMenuItem: (items: NavigationItem[], id: NamespacedId) => NavigationItem | undefined; removeItemFromMenu: (items: NavigationItem[], key: NamespacedId) => NavigationItem[]; }; declare const appStore: import("zustand").StoreApi; declare const useAppStore: (selector: (state: AppActions & AppState) => T) => T; //#endregion export { AppActions, AppState, appStore, helpers, useAppStore }; //# sourceMappingURL=appStore.d.ts.map