1import type { MediaReference } from "@t3tools/client-runtime/media-reference";
2import type { AssetResource, EnvironmentId, ThreadId } from "@t3tools/contracts";
3import type { FileBackedComposerAttachment } from "./composerImages";
4
5/** Authored source metadata is kept separate from temporary preview/download URLs. */
6export type MediaActionsSource = {
7 readonly reference?: MediaReference;
8 readonly name: string;
9 readonly mimeType: string;
10 /** Anchors the iOS share sheet to the view that opened the menu. */
11 readonly sourceIdentifier?: string;
12} & (
13 | { readonly uri: string }
14 | { readonly attachment: FileBackedComposerAttachment }
15 | {
16 readonly environmentId: EnvironmentId;
17 readonly threadId?: ThreadId;
18 readonly resource: AssetResource;
19 }
20);