"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); exports.SignInCardView = exports.SearchCardView = exports.TextInputCardView = exports.ImageCardView = exports.PrimaryTextCardView = exports.BasicCardView = void 0; /** * Helper method to create a Basic Card View. * The Basic Text card view displays the following: * - Card bar * - One primary text field * - Zero or one button in the Medium card size, up to two buttons in Large card size; or text input. * * @param cardBar - card bar component * @param header - text component to display as header * @param footer - up to two buttons or text input to display as footer * @returns basic card view parameters. */ function BasicCardView(cardBar, header, footer) { return { cardViewType: 'text', body: undefined, cardBar: [cardBar], header: [header], footer: footer, }; } exports.BasicCardView = BasicCardView; /** * Helper method to create a Primary Text Card View. * The Primary Text card view displays the following: * - Card bar * - One primary text field * - One description text field * - Zero or one button in the Medium card size, up to two buttons in Large card size; or text input. * * @param cardBar - card bar component * @param header - text component to display as header * @param body - text component to display as body * @param footer - up to two buttons or text input to display as footer * @returns primary text card view parameters. */ function PrimaryTextCardView(cardBar, header, body, footer) { return { cardViewType: 'text', cardBar: [cardBar], header: [header], body: [body], footer: footer, }; } exports.PrimaryTextCardView = PrimaryTextCardView; /** * Helper method to create an Image Card View. * The Image Card view displays the following: * - Card bar * - One primary text field * - One image * - Zero buttons in the Medium card size, up to two buttons in Large card size; or text input. * * @param cardBar - card bar component * @param header - text component to display as header * @param image - image to display * @param footer - up to two buttons or text input to display as footer * @returns image card view parameters */ function ImageCardView(cardBar, header, image, footer) { return { cardViewType: 'text', image: image, cardBar: [cardBar], header: [header], body: undefined, footer: footer, }; } exports.ImageCardView = ImageCardView; /** * Helper method to create an Text Input Card View. * The Text Input Card view displays the following: * - Card bar * - One primary text field * - Zero or one image * - Zero text input in Medium card size if image is presented, one text input in Medium card size if no image is presented, one text input in Large card size * - Zero buttons in the Medium card size if image is presented, one button in Medium card size if no image is presented, up to two buttons in Large card size; or text input. * * @param cardBar - card bar component * @param header - text component to display as header * @param body - text input component to display as body * @param footer - up to two buttons to display as footer * @returns text input card view parameters */ function TextInputCardView(cardBar, header, body, footer) { return { cardViewType: 'textInput', cardBar: [cardBar], header: [header], body: [body], footer: footer, }; } exports.TextInputCardView = TextInputCardView; /** * Helper method to create a Search Card View. * The Search Card view displays the following: * - Card bar * - One primary text field * - One search box * - One search footer * * @param cardBar - card bar component * @param header - text component to display as header * @param body - search box component to display as body * @param footer - search footer component to display as footer * @returns search card view parameters */ function SearchCardView(cardBar, header, body, footer) { return { cardViewType: 'search', cardBar: [cardBar], header: [header], body: [body], footer: [footer], }; } exports.SearchCardView = SearchCardView; /** * Helper method to create a Sign In Card View. * The Sign In Card view displays the following: * - Card bar * - One primary text field * - One description text field * - Two buttons. * * @remarks The first button (sign in button) is always displayed based on the signInText property of the Adaptive Card Extension. Here you should specify the second button (sign in complete button) to display. * @param cardBar - card bar component * @param header - text component to display as header * @param body - text component to display as body * @param footer - sign in complete button to display as footer * @returns sign in card view parameters */ function SignInCardView(cardBar, header, body, footer) { return { cardViewType: 'signIn', cardBar: [cardBar], header: [header], body: [body], footer: [footer], }; } exports.SignInCardView = SignInCardView; //# sourceMappingURL=cardViewParameters.js.map