function createDialogStartHeroCard()

in Node/core/src/botbuilder-location.ts [128:158]


function createDialogStartHeroCard() {
    return common.createBaseDialog()
        .onBegin(function (session, args) {
            const possibleBranches = [ session.gettext(Strings.FavoriteLocations), session.gettext(Strings.OtherLocation) ];
            let buttons = new Array();
            for (let i =0; i < possibleBranches.length; i++) {
                var button = new CardAction(session);
                button.type("imBack");
                button.value(possibleBranches[i]);       
                button.title(possibleBranches[i]);       
                buttons.push(button);
            }

            var card = new HeroCard();
            card.buttons(buttons);
            card.subtitle(session.gettext(Strings.DialogStartBranchAsk));

            var attachments = new Array();
            attachments.push(card.toAttachment());
          
            session.send( new Message(session).attachmentLayout(AttachmentLayout.carousel).attachments(attachments)).sendBatch();
        }).onDefault((session) => {
            const text: string = session.message.text;
            if (text === session.gettext(Strings.OtherLocation) || text === session.gettext(Strings.FavoriteLocations)) {
                session.endDialogWithResult({ response: { entity: text } });
            }
            else {
               session.send(session.gettext(Strings.InvalidStartBranchResponse)).sendBatch();
            }
        });
}