{"version":3,"sources":["../../../src/window/types/file.ts"],"names":["FileFormats"],"mappings":"AAQY,IAAA,WAAA,qBAAAA,YAAL,KAAA;AAEL,EAAAA,aAAA,QAAS,CAAA,GAAA,QAAA;AAGT,EAAAA,aAAA,IAAK,CAAA,GAAA,IAAA;AALK,EAAAA,OAAAA,YAAAA;AAAA,CAAA,EAAA,WAAA,IAAA,EAAA","file":"file.mjs","sourcesContent":["/**\n * Enum for file formats supported\n */\nexport type FileFormat = 'base64' | 'id';\n\n/**\n * Enum for file formats supported\n */\nexport enum FileFormats {\n  /** Base64 encoding */\n  Base64 = 'base64',\n\n  /** File id */\n  ID = 'id',\n}\n\n/**\n * File object that can be used to represent image or video or audio\n */\nexport interface File {\n  /**\n   * Content of the file. When format is Base64, this is the base64 content\n   * When format is ID, this is id mapping to the URI\n   * When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.\n   */\n  content: string;\n\n  /**\n   * Format of the content\n   */\n  format: FileFormat;\n\n  /**\n   * Size of the file in KB\n   */\n  size: number;\n\n  /**\n   * MIME type. This can be used for constructing a dataUrl, if needed.\n   */\n  mimeType: string;\n\n  /**\n   * Optional: Name of the file\n   */\n  name?: string;\n}\n"]}