packageDocumentation module import { IModelApp , Tool } from "@itwin/core-frontend" ; import { TestUiProvider } from "../ui/dialogs/TestUiProviderDialog" ; import { ToolbarItemUtilities } from "@itwin/appui-abstract" ; import { UiItemsProvidersTest } from "../ui-items-providers-test" ; alpha export class OpenAbstractDialogTool extends Tool { public static override toolId = "uiItemsProvidersTest-OpenAbstractModalDialogTool" ; public static override iconSpec = "icon-lightbulb-2" ; public static override get minArgs ( ) { return 0 ; } public static override get maxArgs ( ) { return 0 ; } public override async run ( ) { IModelApp . uiAdmin . openDialog ( new TestUiProvider ( ) , "Test Abstract Dialog" , true , "ui-item-provider-test:AbstractDialog" , { movable : true , width : "auto" , } ) ; return true ; } public static override get flyover ( ) : string { return UiItemsProvidersTest . translate ( "tools.open-abstract-dialog" ) ; } public static override get keyin ( ) : string { return this . englishKeyin ; } public static override get englishKeyin ( ) : string { return "open abstract dialog" ; } public static getActionButtonDef ( itemPriority , groupPriority ? ) { const overrides = { groupPriority , } ; return ToolbarItemUtilities . createActionButton ( OpenAbstractDialogTool . toolId , itemPriority , OpenAbstractDialogTool . iconSpec , OpenAbstractDialogTool . flyover , async ( ) => { await IModelApp . tools . run ( OpenAbstractDialogTool . toolId ) ; } , overrides ) ; } }