/**
 * Notification type definitions
 * Centralized type exports for notification system
 */

export type NotificationType =
	| 'order_created'
	| 'payment_success'
	| 'payment_failed'
	| 'order_shipped'
	| 'order_delivered'
	| 'system_alert'
	| 'promotion'
	| 'chat_message'
	| 'security_alert'
	| 'account_update';
export type NotificationChannel = 'in_app' | 'push' | 'email' | 'sms' | 'zalo';
export type Platform = 'web' | 'ios' | 'android' | 'zalo_mini_app';
export type DeliveryStatus = 'queued' | 'processing' | 'sent' | 'delivered' | 'failed' | 'cancelled' | 'expired';

export interface CreateNotificationParams {
	userId: string | string[];
	title: string;
	body: string;
	type: NotificationType;
	channel: NotificationChannel;
	platform?: Platform;
	data?: Record<string, unknown>;
	tenantId?: string;
	expiredAt?: Date | null;
}

export interface DeliveryResult {
	deviceId?: string;
	channel: NotificationChannel;
	status: DeliveryStatus;
	errorMessage?: string;
}

export interface ZaloOaApiResponse {
	error: number;
	data?: {
		msg_id: string;
	};
	message?: string;
}

export interface ZaloZnsApiResponse {
	error: number;
	data?: {
		msg_id: string;
	};
	message?: string;
}
