export interface Photo {
	id: string;
	status: string;
	originalName: string | null;
	mimeType: string;
	size: number;
	hash: string;
	url: string;
	thumbnailUrl?: string;
	urls: {
		original: string;
		thumbnail?: string;
		medium?: string;
		large?: string;
	};
	width?: number;
	height?: number;
	metadata?: {
		width?: number;
		height?: number;
		format?: string;
	};
	exif?: ExifData;
	isFavorited: boolean;
	tags: Tag[];
	createdAt: string;
}

export interface ExifData {
	cameraMake?: string;
	cameraModel?: string;
	dateTaken?: string;
	focalLength?: string;
	aperture?: string;
	iso?: number;
	exposureTime?: string;
	gpsLatitude?: string;
	gpsLongitude?: string;
}

export interface Album {
	id: string;
	name: string;
	description?: string;
	coverMediaId?: string;
	coverUrl?: string;
	isAutoGenerated: boolean;
	autoGenerateType?: string;
	autoGenerateValue?: string;
	itemCount: number;
	createdAt: string;
	updatedAt: string;
}

export interface AlbumWithItems extends Album {
	items: AlbumItem[];
}

export interface AlbumItem {
	id: string;
	albumId: string;
	mediaId: string;
	sortOrder: number;
	addedAt: string;
}

export interface Tag {
	id: string;
	name: string;
	color?: string;
	createdAt: string;
}

export interface PhotoStats {
	totalCount: number;
	totalSize: number;
	byApp: Record<string, { count: number; size: number }>;
	byYear: Record<string, number>;
}

export interface ListPhotosParams {
	apps?: string[];
	mimeType?: string;
	dateFrom?: string;
	dateTo?: string;
	hasLocation?: boolean;
	limit?: number;
	offset?: number;
	sortBy?: 'createdAt' | 'dateTaken' | 'size';
	sortOrder?: 'asc' | 'desc';
}

export interface ListPhotosResult {
	items: Photo[];
	total: number;
	hasMore: boolean;
}

export interface PhotoFilters {
	apps?: string[];
	mimeType?: string;
	dateFrom?: string;
	dateTo?: string;
	hasLocation?: boolean;
	limit?: number;
	offset?: number;
	sortBy?: 'createdAt' | 'dateTaken' | 'size';
	sortOrder?: 'asc' | 'desc';
}
