{"version":3,"sources":["../../src/actions/show-card.ts"],"names":[],"mappings":";;AAqBO,MAAM,uBAAuB,MAAkC,CAAA;AAAA,EACpE,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,IAAA;AAAA,EAEA,WAAY,CAAA,IAAA,EAAa,OAA2B,GAAA,EAAI,EAAA;AACtD,IAAM,KAAA,EAAA;AACN,IAAA,IAAA,CAAK,IAAO,GAAA,iBAAA;AACZ,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA;AACZ,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA;AAC7B,EAEA,OAAO,KAAK,OAAwC,EAAA;AAClD,IAAA,OAAO,IAAI,cAAA,CAAe,OAAQ,CAAA,IAAA,EAAM,OAAO,CAAA;AAAA;AACjD,EAEA,SAAS,KAAc,EAAA;AACrB,IAAA,IAAA,CAAK,IAAO,GAAA,KAAA;AACZ,IAAO,OAAA,IAAA;AAAA;AAEX","file":"show-card.mjs","sourcesContent":["import { ICard } from '../card';\n\nimport { IAction, Action } from './base';\n\n/**\n * Defines an AdaptiveCard which is shown to the user when the button or link is clicked.\n */\nexport interface IShowCardAction extends IAction {\n  type: 'Action.ShowCard';\n\n  /**\n   * the card to display\n   */\n  card: ICard;\n}\n\nexport type ShowCardOptions = Omit<IShowCardAction, 'type' | 'card'>;\n\n/**\n * Defines an AdaptiveCard which is shown to the user when the button or link is clicked.\n */\nexport class ShowCardAction extends Action implements IShowCardAction {\n  type: 'Action.ShowCard';\n\n  /**\n   * the card to display\n   */\n  card: ICard;\n\n  constructor(card: ICard, options: ShowCardOptions = {}) {\n    super();\n    this.type = 'Action.ShowCard';\n    this.card = card;\n    Object.assign(this, options);\n  }\n\n  static from(options: Omit<IShowCardAction, 'type'>) {\n    return new ShowCardAction(options.card, options);\n  }\n\n  withCard(value: ICard) {\n    this.card = value;\n    return this;\n  }\n}\n"]}