// Shared helpers for StoryOverlayButtons.xm and DMOverlayButtons.xm.

#import "StoryHelpers.h"

// Disjoint tag spaces so viewWithTag: can't cross-hit between surfaces.
#define SCI_STORY_EYE_TAG    1339
#define SCI_STORY_ACTION_TAG 1340
#define SCI_STORY_AUDIO_TAG  1341
#define SCI_DM_ACTION_TAG    1342
#define SCI_DM_EYE_TAG       1343
#define SCI_DM_AUDIO_TAG     1344

#ifdef __cplusplus
extern "C" {
#endif

// From StoryAudioToggle.xm.
void sciToggleStoryAudio(void);
BOOL sciIsStoryAudioEnabled(void);
void sciInitStoryAudioState(void);

#ifdef __cplusplus
}
#endif
extern BOOL dmVisualMsgsViewedButtonEnabled;
#ifdef __cplusplus
extern "C" {
#endif

// Context detection / view lookup.
BOOL sciOverlayIsInDMContext(UIView *overlay);
UIView * _Nullable sciFindOverlayInView(UIView *root);

// DM disappearing-media actions.
NSURL * _Nullable sciDMMediaURL(UIViewController *dmVC, BOOL *outIsVideo);
void sciDMExpandMedia(UIViewController *dmVC);
void sciDMShareMedia(UIViewController *dmVC);
void sciDMDownloadMedia(UIViewController *dmVC);
void sciDMMarkCurrentAsViewed(UIViewController *dmVC);

// Opens RyukGram settings on the Messages tab.
void sciOpenMessagesSettings(UIView *source);

#ifdef __cplusplus
}
#endif
