//
//  FireworkJsEvent.swift
//  react-native-firework-sdk
//
//  Created by Jeff Zheng on 2021/12/21.
//

import Foundation

/// Video event
enum FWEventName: String, CaseIterable {
    case sdkInit = "fw:sdk-init"
    case customCTAClick = "fw:custom-cta-click"
    case videoPlayback = "fw:video-playback"
    case videoFeedClick = "fw:video-feed-click"
    case shareBaseURLUpdated = "fw:share-base-url-updated"  // emitted in JS side
    case videoLaunchBehaviorUpdated = "fw:video-launch-behavior-updated"  // emitted in JS side
    case adBadgeConfigurationUpdated = "fw:ad-badge-configuration-updated"  // emitted in JS side
    case appLanguageUpdated = "fw:app-language-updated"  // emitted in JS side
    case nativeAppLanguageUpdated = "fw:native-app-language-updated" // emitted in native side
    case logMessage = "fw:log-message"
    case productInfoViewConfigurationUpdated = "fw:product-info-view-configuration-updated" // emitted in JS side
    case livestreamPlayerDesignVersionUpdated = "fw:livestream-player-design-version-updated" // emitted in JS side
    case shortVideoPlayerDesignVersionUpdated = "fw:short-video-player-design-version-updated" // emitted in JS side
    case dataTrackingLevelUpdated = "fw:data-tracking-level-updated" // emitted in JS side
}

enum VideoPlaybackSubEventName: String {
    case impression = "fw:video:impression"
    case start = "fw:video:start"
    case pause = "fw:video:pause"
    case resume = "fw:video:resume"
    case firstQuartile = "fw:video:first-quartile"
    case midpoint = "fw:video:midpoint"
    case thirdQuartile = "fw:video:third-quartile"
    case complete = "fw:video:complete"
    case adStart = "fw:video:ad-start"
    case adEnd = "fw:video:ad-end"
    case clickCTA = "fw:video:click-cta"
    case clickShare = "fw:video:click-share"
}

/// Shopping event
enum ShoppingEventName: String, CaseIterable {
    case updateProductDetails = "fw:shopping:update-product-details"
    case ctaButtonClick = "fw:shopping:cta-button-click"
    case clickCartIcon = "fw:shopping:click-cart-icon"
    case logMessage = "fw:log-message"
    case customLinkButtonClick = "fw:shopping:custom-link-button-click"
    case customProductCardTap = "fw:shopping:custom-product-card-tap"
    case productClick = "fw:shopping:product-click"
}

/// Live stream event
enum LiveStreamEventName: String, CaseIterable {
    case livestream = "fw:livestream"
    case livestreamChat = "fw:livestream-chat"
    case customLinkInteractionClick = "fw:livestream:custom-link-interaction-click"
}

enum LiveStreamSubEventName: String {
    case userDidjoin = "fw:livestream:user-join"
    case userDidLeave = "fw:livestream:user-leave"
    case userSendLike = "fw:livestream:user-send-like"
}

enum LiveStreamChatSubEventName: String {
    case userSendChat = "fw:livestream:user-send-chat"
}
