FoodEmojiDataSource.swift 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. //
  2. // FoodEmojiDataSource.swift
  3. // LoopKit
  4. //
  5. // Copyright ยฉ 2017 LoopKit Authors. All rights reserved.
  6. //
  7. public func CarbAbsorptionInputController() -> EmojiInputController {
  8. return EmojiInputController.instance(withEmojis: FoodEmojiDataSource())
  9. }
  10. private class FoodEmojiDataSource: EmojiDataSource {
  11. private static let fast: [String] = {
  12. var fast = [
  13. "๐Ÿญ", "๐Ÿฌ", "๐Ÿฏ",
  14. "๐Ÿ‡", "๐Ÿˆ", "๐Ÿ‰", "๐ŸŠ", "๐Ÿ‹", "๐ŸŒ", "๐Ÿ",
  15. "๐ŸŽ", "๐Ÿ", "๐Ÿ", "๐Ÿ‘", "๐Ÿ’", "๐Ÿ“", "๐Ÿฅ",
  16. "๐ŸŒฝ", "๐Ÿฟ", "๐Ÿ˜", "๐Ÿก", "๐Ÿฆ", "๐Ÿง", "๐ŸŽ‚", "๐Ÿฅ ",
  17. "โ˜•๏ธ",
  18. ]
  19. return fast
  20. }()
  21. private static let medium: [String] = {
  22. var medium = [
  23. "๐ŸŒฎ", "๐ŸŸ", "๐Ÿณ", "๐Ÿฒ", "๐Ÿฑ", "๐Ÿ›",
  24. "๐Ÿœ", "๐Ÿ ", "๐Ÿค", "๐Ÿฅ",
  25. "๐Ÿฅช", "๐Ÿฅซ", "๐ŸฅŸ", "๐Ÿฅก", "๐Ÿข", "๐Ÿฃ",
  26. "๐Ÿ…", "๐Ÿฅ”", "๐Ÿฅ•", "๐ŸŒถ", "๐Ÿฅ’", "๐Ÿฅ—", "๐Ÿ„", "๐Ÿฅฆ",
  27. "๐Ÿ†", "๐Ÿฅฅ", "๐Ÿž", "๐Ÿฅ", "๐Ÿฅ–", "๐Ÿฅจ", "๐Ÿฅž", "๐Ÿ™", "๐Ÿš",
  28. "๐Ÿผ", "๐Ÿฅ›", "๐Ÿฎ", "๐Ÿฅง",
  29. "๐Ÿจ", "๐Ÿฉ", "๐Ÿช", "๐Ÿฐ", "๐Ÿซ",
  30. ]
  31. return medium
  32. }()
  33. private static let slow: [String] = {
  34. var slow = [
  35. "๐Ÿ•", "๐Ÿฅ‘", "๐Ÿฅœ", "๐ŸŒฐ", "๐Ÿง€", "๐Ÿ–", "๐Ÿ—", "๐Ÿฅ“",
  36. "๐Ÿ”", "๐ŸŒญ", "๐ŸŒฏ", "๐Ÿ", "๐Ÿฅฉ"
  37. ]
  38. return slow
  39. }()
  40. private static let other: [String] = {
  41. var other = [
  42. "๐Ÿถ", "๐Ÿพ", "๐Ÿท", "๐Ÿธ", "๐Ÿบ", "๐Ÿป", "๐Ÿฅ‚", "๐Ÿฅƒ",
  43. "๐Ÿน", "๐Ÿฅฃ", "๐Ÿฅค", "๐Ÿฅข", "๐Ÿต",
  44. "1๏ธโƒฃ", "2๏ธโƒฃ", "3๏ธโƒฃ", "4๏ธโƒฃ", "5๏ธโƒฃ",
  45. "6๏ธโƒฃ", "7๏ธโƒฃ", "8๏ธโƒฃ", "9๏ธโƒฃ", "๐Ÿ”Ÿ"
  46. ]
  47. return other
  48. }()
  49. let sections: [EmojiSection]
  50. init() {
  51. sections = [
  52. EmojiSection(
  53. title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
  54. items: type(of: self).fast,
  55. indexSymbol: " ๐Ÿญ "
  56. ),
  57. EmojiSection(
  58. title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
  59. items: type(of: self).medium,
  60. indexSymbol: "๐ŸŒฎ"
  61. ),
  62. EmojiSection(
  63. title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
  64. items: type(of: self).slow,
  65. indexSymbol: "๐Ÿ•"
  66. ),
  67. EmojiSection(
  68. title: LocalizedString("Other", comment: "Section title for no-carb food"),
  69. items: type(of: self).other,
  70. indexSymbol: "โ‹ฏ "
  71. )
  72. ]
  73. }
  74. }