import * as React from 'react'; import './TS_Dialog.scss'; import { ComponentSync } from '../../core/ComponentSync.js'; import { DialogKey } from '../../component-modules/ModuleFE_Dialog.js'; /** * ###DialogButton * * Type defining the properties for a dialog button passed on to TS_Dialog. */ export type DialogButton = { content: React.ReactNode; onClick?: (e: React.KeyboardEvent | React.MouseEvent) => void | Promise; onDisabledClick?: (e: React.MouseEvent) => any; className?: string; associatedKeys?: string[]; disabled?: boolean; renderer?: (button: DialogButton, index: number, ref?: React.RefObject) => React.ReactNode; variant?: string; }; export type DialogButtons = { left?: DialogButton[]; center?: DialogButton[]; right?: DialogButton[]; }; /** * Base state for TS_Dialog */ export type State_TSDialog = { dialogIsBusy?: boolean; error?: Error; }; /** * Base Props for TS_Dialog */ export type Props_TSDialog = { dialogKey?: string; dialogId: string; className?: string; }; /** * ##TS_Dialog * * This class defines the logic and render behavior for dialogs in the system. * Any dialog class in the system is meant to inherit this class to utilize its features. */ export declare abstract class TS_Dialog

extends ComponentSync

{ __consumeDialogCloseEvent(dialogKey: DialogKey): boolean; componentDidMount(): void; /** * A map held per instance connecting a (keyboard)key to a dialog button. * This map is filled in by calling _keyActionMapCreator with buttons. * @protected */ private readonly keyActionMap; /** * A function to fill in keyActionMap. * * This function receives an array of buttons and for each button will connect any associated * keys to the button, to be used by dialogKeyEventHandler. * * Keep in mind: * * 1. If an associated key is found in more than one button, an error will be thrown. * * 2. This function must be called in the constructor of the inheriting class. * * @param buttons - an array of buttons of type DialogButton */ private _keyActionMapCreator; protected deriveStateFromProps(nextProps: P, state: S): S; private dialogKeyEventHandler; protected _buttonsCreator: (buttons?: DialogButton[]) => import("react/jsx-runtime").JSX.Element | undefined; protected closeDialog: (force?: boolean) => void; private dialogHeader; protected renderHeader: () => React.ReactNode | undefined; private dialogBody; protected renderBody: () => React.ReactNode | undefined; private dialogButtons; protected buttons: () => DialogButtons; protected performAction: (action: () => Promise) => void; render(): import("react/jsx-runtime").JSX.Element; static button: (button: DialogButton, index: number, ref?: React.RefObject) => import("react/jsx-runtime").JSX.Element; static Button_Cancel: { content: string; onClick: () => void; associatedKeys: string[]; }; }