import { DashboardResource, DurationString, EphemeralDashboardResource, PanelDefinition, PanelGroupId, PanelGroupDefinition, PanelGroupItemId, PanelGroupItemLayout } from '@perses-dev/core'; import { DeletePanelGroupDialogState } from './delete-panel-group-slice'; import { PanelGroupEditor } from './panel-group-editor-slice'; import { PanelEditorState } from './panel-editor-slice'; import { DeletePanelDialogState } from './delete-panel-slice'; import { SaveChangesConfirmationDialogState } from './save-changes-dialog-slice'; import { DiscardChangesConfirmationDialogState } from './discard-changes-dialog-slice'; import { EditJsonDialogState } from './edit-json-dialog-slice'; import { ViewPanelSlice } from './view-panel-slice'; export declare function useEditMode(): { setEditMode: (isEditMode: boolean) => void; isEditMode: boolean; }; /** * Returns actions that can be performed on the current dashboard. */ export declare function useDashboardActions(): { openAddPanelGroup: () => void; openAddPanel: () => void; setDashboard: (dashboard: DashboardResource | EphemeralDashboardResource) => void; }; /** * Returns an array of PanelGroupIds in the order they appear in the dashboard. */ export declare function usePanelGroupIds(): number[]; /** * Returns an array of PanelGroupDefinitions in the order they appear in the dashboard. */ export declare function useListPanelGroups(): PanelGroupDefinition[]; /** * Gets a specific panel group by its id. Throws if the panel group does not exist. */ export declare function usePanelGroup(panelGroupId: PanelGroupId): PanelGroupDefinition; /** * Returns actions that can be performed on the given panel group. */ export declare function usePanelGroupActions(panelGroupId: PanelGroupId): { updatePanelGroupLayouts: (itemLayouts: PanelGroupItemLayout[]) => void; openEditPanelGroup: () => void; openAddPanel: () => void; moveDown: (() => void) | undefined; deletePanelGroup: () => void; moveUp: (() => void) | undefined; }; /** * Gets the Panel Group editor state. */ export declare function usePanelGroupEditor(): PanelGroupEditor | undefined; /** * Gets the Delete Panel Group dialog state. */ export declare function useDeletePanelGroupDialog(): { deletePanelGroupDialog: DeletePanelGroupDialogState | undefined; closeDeletePanelGroupDialog: () => void; openDeletePanelGroupDialog: (panelGroupId: PanelGroupId) => void; deletePanelGroup: (panelGroupId: PanelGroupId) => void; }; export declare function usePanelKey(panelGroupItemId?: PanelGroupItemId): string | undefined; /** * Gets an individual panel in the store. Throws if the panel can't be found. */ export declare function usePanel(panelGroupItemId: PanelGroupItemId): PanelDefinition; /** * Returns actions that can be performed on the given Panel. */ export declare function usePanelActions(panelGroupItemId: PanelGroupItemId): { openDeletePanelDialog: () => void; duplicatePanel: () => void; openEditPanel: () => void; viewPanel: (panelGroupItemId?: PanelGroupItemId) => void; }; /** * Gets the state for the Panel Editor. */ export declare function usePanelEditor(): PanelEditorState | undefined; /** * Gets the state for the Delete Panel dialog. */ export declare function useDeletePanelDialog(): { deletePanelDialog: DeletePanelDialogState | undefined; closeDeletePanelDialog: () => void; deletePanel: (panelGroupItemId: PanelGroupItemId) => void; }; export declare function useDashboardDuration(): DurationString; /** * Returns actions related to the ViewPanel. */ export declare function useViewPanel(): { setViewPanel: ViewPanelSlice['setViewPanel']; getViewPanel: ViewPanelSlice['getViewPanel']; viewPanelId: ViewPanelSlice['viewPanel']['panelGroupItemId']; }; /** * Gets the Panel Group for the view panel. */ export declare function useViewPanelGroup(): PanelGroupItemId | undefined; export declare function useSaveChangesConfirmationDialog(): { closeSaveChangesConfirmationDialog: () => void; openSaveChangesConfirmationDialog: (saveChangesConfirmationDialog: SaveChangesConfirmationDialogState) => void; saveChangesConfirmationDialog: SaveChangesConfirmationDialogState | undefined; }; export declare function useDiscardChangesConfirmationDialog(): { discardChangesConfirmationDialog: DiscardChangesConfirmationDialogState | undefined; closeDiscardChangesConfirmationDialog: () => void; openDiscardChangesConfirmationDialog: (discardChangesConfirmationDialog: DiscardChangesConfirmationDialogState) => void; }; /** * Gets the state for the edit JSON dialog. */ export declare function useEditJsonDialog(): { openEditJsonDialog: () => void; closeEditJsonDialog: () => void; editJsonDialog: EditJsonDialogState | undefined; }; //# sourceMappingURL=dashboard-provider-api.d.ts.map