diff options
Diffstat (limited to 'src/image-attachments.ts')
| -rw-r--r-- | src/image-attachments.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/image-attachments.ts b/src/image-attachments.ts new file mode 100644 index 0000000..add2afd --- /dev/null +++ b/src/image-attachments.ts @@ -0,0 +1,24 @@ +export interface ImageAttachment { + base64: string; + mimeType: string; + originalName: string; + arrayBuffer: ArrayBuffer; +} + +let currentAttachments: ImageAttachment[] = []; + +export function setCurrentAttachments(attachments: ImageAttachment[]): void { + currentAttachments = attachments; +} + +export function getCurrentAttachments(): ImageAttachment[] { + return currentAttachments; +} + +export function clearCurrentAttachments(): void { + currentAttachments = []; +} + +export function hasCurrentAttachments(): boolean { + return currentAttachments.length > 0; +} |
