import { whisper } from "@oliveai/ldk"
} from "@oliveai/ldk/dist/whisper"
const collapseBoxExampleConfig = ((collapseBoxLabel: string, isOpen: boolean): NewWhisper | UpdateWhisper => {
label: "Collapse Box Example",
type: WhisperComponentType.CollapseBox,
previewHeight: Size.Small,
openDirection: OpenDirection.Bottom,
onClick: async (error: Error, params: boolean, whisper: Whisper) => {
console.log(`CollapseBox params: ${params}`);
whisper.update(collapseBoxExampleConfig("Hide Collapse Box Content", params) as UpdateWhisper);
whisper.update(collapseBoxExampleConfig("Show Collapse Box Content", params) as UpdateWhisper);
type: WhisperComponentType.Markdown,
body: "Collapse Box Contents 1"
type: WhisperComponentType.Markdown,
body: "Collapse Box Contents 2"
type: WhisperComponentType.Markdown,
body: "Collapse Box Contents 3"
type: WhisperComponentType.Markdown,
body: "Collapse Box Contents 4"
type: WhisperComponentType.Markdown,
body: "Collapse Box Contents 5"
const collapseBoxExample = (async () => {
await whisper.create(collapseBoxExampleConfig("Hide Collapse Box Content", true) as NewWhisper);