// AUTO-GENERATED FILE - DO NOT EDIT
// Generated by tools/story_gen/story_gen.py
// spec_hash: 4146e7c78895
// scenarios: 4

#include "apps_gen.h"

#include <cstring>

namespace {
constexpr AppBindingDef kGeneratedAppBindings[] = {
    {"APP_AUDIO", StoryAppType::kAudioPack},
    {"APP_GATE", StoryAppType::kMp3Gate},
    {"APP_LA", StoryAppType::kLaDetector},
    {"APP_SCREEN", StoryAppType::kScreenScene},
};
constexpr LaDetectorAppConfigDef kGeneratedLaConfigs[] = {
    {"APP_LA", true, 3000U, "UNLOCK", true},
};
}  // namespace

const AppBindingDef* generatedAppBindingById(const char* id) {
  if (id == nullptr || id[0] == '\0') {
    return nullptr;
  }
  for (const AppBindingDef& binding : kGeneratedAppBindings) {
    if (binding.id != nullptr && strcmp(binding.id, id) == 0) {
      return &binding;
    }
  }
  return nullptr;
}

uint8_t generatedAppBindingCount() {
  return static_cast<uint8_t>(sizeof(kGeneratedAppBindings) / sizeof(kGeneratedAppBindings[0]));
}

const char* generatedAppBindingIdAt(uint8_t index) {
  if (index >= generatedAppBindingCount()) {
    return nullptr;
  }
  return kGeneratedAppBindings[index].id;
}

const LaDetectorAppConfigDef* generatedLaDetectorConfigByBindingId(const char* id) {
  if (id == nullptr || id[0] == '\0') {
    return nullptr;
  }
  for (const LaDetectorAppConfigDef& cfg : kGeneratedLaConfigs) {
    if (cfg.bindingId != nullptr && strcmp(cfg.bindingId, id) == 0) {
      return &cfg;
    }
  }
  return nullptr;
}

