{"version":3,"file":"ActionMenuOptionForm.mjs","names":[],"sources":["../../src/models/ActionMenuOptionForm.ts"],"sourcesContent":["import { Expose, Type } from 'class-transformer'\nimport { IsInstance, IsString } from 'class-validator'\nimport type { ActionMenuFormParameterOptions } from './ActionMenuOptionFormParameter'\n\nimport { ActionMenuFormParameter } from './ActionMenuOptionFormParameter'\n\n/**\n * @public\n */\nexport interface ActionMenuFormOptions {\n  description: string\n  params: ActionMenuFormParameterOptions[]\n  submitLabel: string\n}\n\n/**\n * @public\n */\nexport class ActionMenuForm {\n  public constructor(options: ActionMenuFormOptions) {\n    if (options) {\n      this.description = options.description\n      this.params = options.params.map((p) => new ActionMenuFormParameter(p))\n      this.submitLabel = options.submitLabel\n    }\n  }\n\n  @IsString()\n  public description!: string\n\n  @Expose({ name: 'submit-label' })\n  @IsString()\n  public submitLabel!: string\n\n  @IsInstance(ActionMenuFormParameter, { each: true })\n  @Type(() => ActionMenuFormParameter)\n  public params!: ActionMenuFormParameter[]\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAa,iBAAb,MAA4B;CAC1B,AAAO,YAAY,SAAgC;AACjD,MAAI,SAAS;AACX,QAAK,cAAc,QAAQ;AAC3B,QAAK,SAAS,QAAQ,OAAO,KAAK,MAAM,IAAI,wBAAwB,EAAE,CAAC;AACvE,QAAK,cAAc,QAAQ;;;;YAI9B,UAAU;;CAGV,OAAO,EAAE,MAAM,gBAAgB,CAAC;CAChC,UAAU;;;;CAGV,WAAW,yBAAyB,EAAE,MAAM,MAAM,CAAC;CACnD,WAAW,wBAAwB"}