const { dialogSelectedOptionId } = await displayDialog({
dialogConfig: {
title: `Hello, world!`,
message: `This is a test dialog.`,
type: DialogType.InfoDialog,
},
dialogOptionsInfo: {
ok: {
label: `Ok`,
},
cancel: {
label: `Cancel`,
},
},
});

if (dialogSelectedOptionId === `ok`) {
console.log(`User clicked "Ok"`);
} else if (dialogSelectedOptionId === `cancel`) {
console.log(`User clicked "Cancel"`);
} else {
// Unreachable code
}