@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
37 lines (36 loc) • 976 B
TypeScript
import { ReportType } from '../../types/UserReports';
import { DprClientClass } from '../../DprClientClass';
export declare enum BookmarkAction {
ADD = "add",
REMOVE = "remove"
}
declare class BookmarkButton extends DprClientClass {
csrfToken: string;
reportId: string | null;
id: string | null;
linkType: BookmarkAction;
reportType: ReportType;
endpoint: string;
baseUrl: string;
isRunning: boolean;
static getModuleName(): string;
initialise(): void;
/**
* Updates the bookmark button UI so that it shows:
* - the correct text
* - toggles the bookmark on and off correctly
*
* @memberof BookmarkButton
*/
updateUI(): void;
/**
* Inits the bookmark button click event
*
* @memberof BookmarkButton
*/
initEventListener(): void;
activateBookmark(e: Event): Promise<void>;
setReportType(): void;
}
export { BookmarkButton };
export default BookmarkButton;