{"version":3,"sources":["../../src/layouts/stack.ts"],"names":[],"mappings":"AAmBO,MAAM,WAAoC,CAAA;AAAA,EAC/C,IAAA;AAAA;AAAA;AAAA;AAAA,EAKA,WAAA;AAAA,EAEA,WAAA,CAAY,OAA8B,GAAA,EAAI,EAAA;AAC5C,IAAA,IAAA,CAAK,IAAO,GAAA,cAAA;AACZ,IAAO,MAAA,CAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA;AAC7B,EAEA,OAAO,KAAK,OAA6B,EAAA;AACvC,IAAO,OAAA,IAAI,YAAY,OAAO,CAAA;AAAA;AAChC,EAEA,gBAAgB,KAAoB,EAAA;AAClC,IAAA,IAAA,CAAK,WAAc,GAAA,KAAA;AACnB,IAAO,OAAA,IAAA;AAAA;AAEX","file":"stack.mjs","sourcesContent":["import { TargetWidth } from '../common';\n\n/**\n * A layout that stacks elements on top of each other. Layout.Stack is the default layout used by AdaptiveCard and all containers.\n */\nexport interface IStackLayout {\n  type: 'Layout.Stack';\n\n  /**\n   * Controls for which card width the layout should be used.\n   */\n  targetWidth?: TargetWidth;\n}\n\nexport type StackLayoutOptions = Omit<IStackLayout, 'type'>;\n\n/**\n * A layout that stacks elements on top of each other. Layout.Stack is the default layout used by AdaptiveCard and all containers.\n */\nexport class StackLayout implements IStackLayout {\n  type: 'Layout.Stack';\n\n  /**\n   * Controls for which card width the layout should be used.\n   */\n  targetWidth?: TargetWidth;\n\n  constructor(options: StackLayoutOptions = {}) {\n    this.type = 'Layout.Stack';\n    Object.assign(this, options);\n  }\n\n  static from(options: StackLayoutOptions) {\n    return new StackLayout(options);\n  }\n\n  withTargetWidth(value: TargetWidth) {\n    this.targetWidth = value;\n    return this;\n  }\n}\n"]}