object Ui {
  object ChatList {
    val NewChat = UiKey("chatList.newChat")
    val UserPicker = UiKey("chatList.userPicker")
    fun Row(chatId: String, remoteHostId: Long? = null) = UiKey("chatList.row", rowArg(chatId, remoteHostId))
    fun RowMenu(chatId: String, action: String, remoteHostId: Long? = null) = UiKey("chatList.row.menu.$action", rowArg(chatId, remoteHostId))
    private fun rowArg(chatId: String, rh: Long?) = if (rh == null) chatId else "$rh:$chatId"
  }
  object NewChat {
    val CreateLink = UiKey("newChat.createLink")
    val PasteLink = UiKey("newChat.pasteLink")
    val CreateGroup = UiKey("newChat.createGroup")
    val CreateChannel = UiKey("newChat.createChannel")
  }
  object UserPicker {
    fun User(userId: Long) = UiKey("userPicker.user", userId)
    val Address = UiKey("userPicker.address")
    val Settings = UiKey("userPicker.settings")
  }
  object Settings {
    val Appearance = UiKey("settings.appearance")
  }
  object Appearance {
    val ColorMode = UiKey("appearance.colorMode")
    val FontScale = UiKey("appearance.fontScale")
    val Zoom = UiKey("appearance.zoom")
  }
  object Address {
    val Create = UiKey("address.create")
    val Share = UiKey("address.share")
  }
  object NewGroup {
    val Name = UiKey("newGroup.name")
    val Create = UiKey("newGroup.create")
  }
  object Profile {
    val Name = UiKey("profile.name")
    val Save = UiKey("profile.save")
  }
  object Link {
    val Text = UiKey("link.text")
    val ShareProfile = UiKey("link.shareProfile")
    val ProfileIncognito = UiKey("link.profile.incognito")
    fun Profile(userId: Long) = UiKey("link.profile", userId)
  }
  object Chat {
    val Bar = UiKey("chat.bar")
    val Message = UiKey("chat.compose")
    val Send = UiKey("chat.send")
    fun Item(itemId: Long) = UiKey("chat.item", itemId)
    fun ItemMenu(itemId: Long, action: String) = UiKey("chat.item.menu.$action", itemId)
    fun ItemReaction(itemId: Long, emoji: String) = UiKey("chat.item.menu.react", "$itemId:$emoji")
    fun ReactionChip(itemId: Long, emoji: String) = UiKey("chat.item.reaction", "$itemId:$emoji")
  }
  object Info {
    val Alias = UiKey("info.alias")
    val DeleteContact = UiKey("info.deleteContact")
  }
  enum class AlertSource { Shared, PrivacySensitive }
  object Alert {
    fun Title(src: AlertSource) = UiKey("alert.title", src)
    fun Confirm(src: AlertSource) = UiKey("alert.confirm", src)
    fun Dismiss(src: AlertSource) = UiKey("alert.dismiss", src)
    fun Option(src: AlertSource, name: String) = UiKey("alert.option.$name", src)
  }
}
