// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import type {Caption} from '@mattermost/calls/lib/types'; import type {PanGesture, TapGesture} from 'react-native-gesture-handler'; import type {SharedValue} from 'react-native-reanimated'; export type GalleryManagerSharedValues = { width: SharedValue; height: SharedValue; x: SharedValue; y: SharedValue; opacity: SharedValue; activeIndex: SharedValue; targetWidth: SharedValue; targetHeight: SharedValue; scale: SharedValue; } export type GalleryFileType = 'image' | 'video' | 'file' | 'avatar'; export type GalleryItemType = { type: GalleryFileType; id: string; width: number; height: number; uri: string; lastPictureUpdate: number; name: string; posterUri?: string; extension?: string; mime_type: string; authorId?: string; size?: number; postId?: string; postProps?: Record & {captions?: Caption[]}; }; export type GalleryAction = 'none' | 'downloading' | 'copying' | 'sharing' | 'opening' | 'external'; export type GalleryPagerItem = { index: number; onPageStateChange: (value: boolean) => void; item: GalleryItemType; width: number; height: number; isPageActive?: SharedValue; isPagerInProgress: SharedValue; pagerPanGesture: PanGesture; pagerTapGesture: TapGesture; lightboxPanGesture: PanGesture; };