#pragma once
#include <pebble.h>

// Persistent storage key
#define SETTINGS_KEY 1

// Define our settings struct
typedef struct Settings {
  char username;
  char password;
  char server;
} Settings;

//Define our Appkey enums
typedef enum {
  status,
  username,
  password,
  server
} AppKey;

static void prv_save_settings();
static GRect init_text_layer(Layer *parent_layer, TextLayer **text_layer, int16_t y, int16_t h, int16_t additional_right_margin, char *font_key) ;
static void init_statusbar_text_layer(Layer *parent, TextLayer **layer);
static void inbox_dropped_callback(AppMessageResult reason, void *context);
static void outbox_sent_callback(DictionaryIterator *iter, void *context);
static void outbox_failed_callback(DictionaryIterator *iter, AppMessageResult reason, void *context);
static void select_click_handler(ClickRecognizerRef recognizer, void *context);
static void up_click_handler(ClickRecognizerRef recognizer, void *context);
static void down_click_handler(ClickRecognizerRef recognizer, void *context);
static void click_config_provider(void *context);
static void update_time();
static void comm_is_ready();
static void tick_handler(struct tm *tick_time, TimeUnits units_changed);
static void inbox_received_callback(DictionaryIterator *iter, void *context);
static void init(void);
static void deinit(void);
