{
  "version": 3,
  "sources": ["../../src/assets/TLBaseAsset.ts"],
  "sourcesContent": ["import { BaseRecord } from '@bigbluebutton/store'\nimport { JsonObject } from '@bigbluebutton/utils'\nimport { T } from '@bigbluebutton/validate'\nimport { idValidator } from '../misc/id-validator'\nimport { TLAssetId } from '../records/TLAsset'\n\n/** @public */\nexport interface TLBaseAsset<Type extends string, Props> extends BaseRecord<'asset', TLAssetId> {\n\ttype: Type\n\tprops: Props\n\tmeta: JsonObject\n}\n\n/**\n * A validator for asset record type Ids.\n *\n * @public */\nexport const assetIdValidator = idValidator<TLAssetId>('asset')\n\n/**\n * Create a validator for an asset record type.\n *\n * @param type - The type of the asset\n * @param props - The validator for the asset's props\n *\n * @public */\nexport function createAssetValidator<Type extends string, Props extends JsonObject>(\n\ttype: Type,\n\tprops: T.Validator<Props>\n): T.ObjectValidator<{\n\tid: TLAssetId\n\ttypeName: 'asset'\n\ttype: Type\n\tprops: Props\n\tmeta: JsonObject\n}> {\n\treturn T.object({\n\t\tid: assetIdValidator,\n\t\ttypeName: T.literal('asset'),\n\t\ttype: T.literal(type),\n\t\tprops,\n\t\tmeta: T.jsonValue as T.ObjectValidator<JsonObject>,\n\t})\n}\n"],
  "mappings": "AAEA,SAAS,SAAS;AAClB,SAAS,mBAAmB;AAcrB,MAAM,mBAAmB,YAAuB,OAAO;AASvD,SAAS,qBACf,MACA,OAOE;AACF,SAAO,EAAE,OAAO;AAAA,IACf,IAAI;AAAA,IACJ,UAAU,EAAE,QAAQ,OAAO;AAAA,IAC3B,MAAM,EAAE,QAAQ,IAAI;AAAA,IACpB;AAAA,IACA,MAAM,EAAE;AAAA,EACT,CAAC;AACF;",
  "names": []
}
