FoodEmojiDataSource.swift 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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. final class FoodEmojiDataSource: EmojiDataSource {
  11. private static let fast: [String] = {
  12. var fast = [
  13. "🍭", // lollipop
  14. "🧃", // juice box
  15. "🥤", // cup with straw (soda)
  16. "🍬", // candy
  17. "🍯", // honey pot
  18. "🍇", // grapes
  19. "🫐", // blueberries
  20. "🍈", // melon
  21. "🍉", // watermelon
  22. "🍊", // tangerine
  23. "🍋", // lemon
  24. "🍌", // banana
  25. "🍍", // pineapple
  26. "🍎", // red apple
  27. "🍏", // green apple
  28. "🍐", // pear
  29. "🍑", // peach
  30. "🍒", // cherries
  31. "🍓", // strawberry
  32. "🥝", // kiwi fruit
  33. "🥭", // mango
  34. "🌽", // ear of corn
  35. "🍿", // popcorn
  36. "🍘", // rice cracker
  37. "🍡", // dango
  38. "🍦", // soft ice cream
  39. "🍧", // shaved ice
  40. "🎂", // birthday cake
  41. "🥠", // fortune cookie
  42. "☕️", // coffee
  43. "🫖" // tea
  44. ]
  45. return fast
  46. }()
  47. private static let medium: [String] = {
  48. var medium = [
  49. "🌮", // taco
  50. "🍟", // french fries
  51. "🍳", // cooking
  52. "🍲", // pot of food
  53. "🥘", // pan of food
  54. "🍱", // bento box
  55. "🍛", // curry rice
  56. "🍜", // steaming bowl (ramen / noodle soup)
  57. "🍠", // roasted sweet potato
  58. "🍤", // fried shrimp
  59. "🦪", // oyster
  60. "🍥", // fish cake with swirl
  61. "🥪", // sandwich
  62. "🥙", // pita sandwich
  63. "🧆", // falafel
  64. "🫔", // tamale
  65. "🥫", // canned food
  66. "🥟", // dumpling
  67. "🥡", // takeout box
  68. "🍢", // oden
  69. "🍣", // sushi
  70. "🍅", // tomato
  71. "🥔", // potato
  72. "🥕", // carrot
  73. "🌶", // hot pepper
  74. "🫑", // bell pepper
  75. "🧅", // onion
  76. "🧄", // garlic
  77. "🥒", // cucumber
  78. "🥗", // green salad
  79. "🥬", // leafy green
  80. "🍄", // mushroom
  81. "🥦", // broccoli
  82. "🍆", // eggplant
  83. "🫘", // beans
  84. "🥥", // coconut
  85. "🍞", // bread
  86. "🥐", // croissant
  87. "🥖", // baguette bread
  88. "🥯", // bagel
  89. "🫓", // flat bread
  90. "🥨", // pretzel
  91. "🥞", // pancakes
  92. "🧇", // waffle
  93. "🍙", // rice ball
  94. "🍚", // cooked rice
  95. "🍼", // baby bottle
  96. "🥛", // glass of milk
  97. "🍮", // custard
  98. "🥧", // pie
  99. "🍨", // ice cream
  100. "🍩", // doughnut
  101. "🍪", // cookie
  102. "🧁", // cupcake
  103. "🥮", // moon cake
  104. "🍰", // shortcake
  105. "🍫", // chocolate bar
  106. "🧋", // bubble tea
  107. ]
  108. return medium
  109. }()
  110. private static let slow: [String] = {
  111. var slow = [
  112. "🍕", // pizza
  113. "🥑", // avocado
  114. "🥚", // egg
  115. "🥜", // peanuts
  116. "🌰", // chestnut
  117. "🧀", // cheese wedge
  118. "🫕", // fondue
  119. "🍖", // meat on bone
  120. "🍗", // poultry leg
  121. "🥓", // bacon
  122. "🍔", // hamburger
  123. "🌭", // hot dog
  124. "🌯", // burrito
  125. "🍝", // spaghetti
  126. "🥩", // cut of meat
  127. "🧈", // butter
  128. "🦴", // bone
  129. ]
  130. return slow
  131. }()
  132. private static let other: [String] = {
  133. var other = [
  134. "🍶", // sake
  135. "🍾", // bottle with popping cork
  136. "🍷", // wine glass
  137. "🍸", // cocktail glass
  138. "🍺", // beer mug
  139. "🍻", // clinking beer mugs
  140. "🥂", // clinking glasses
  141. "🥃", // tumbler glass
  142. "🍹", // tropical drink
  143. "🧉", // mate
  144. "🫗", // pouring liquid
  145. "🥣", // bowl with spoon
  146. "🥤", // cup with straw
  147. "🥢", // chopsticks
  148. "🍵", // teacup without handle
  149. "🍴", // fork and knife
  150. "🍽", // fork and knife with plate
  151. "🥄", // spoon
  152. "🫙", // jar
  153. "🧊", // ice cube
  154. "🧂", // salt
  155. "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣",
  156. "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"
  157. ]
  158. return other
  159. }()
  160. let sections: [EmojiSection]
  161. init() {
  162. sections = [
  163. EmojiSection(
  164. title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
  165. items: type(of: self).fast,
  166. indexSymbol: " 🍭 "
  167. ),
  168. EmojiSection(
  169. title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
  170. items: type(of: self).medium,
  171. indexSymbol: "🌮"
  172. ),
  173. EmojiSection(
  174. title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
  175. items: type(of: self).slow,
  176. indexSymbol: "🍕"
  177. ),
  178. EmojiSection(
  179. title: LocalizedString("Other", comment: "Section title for no-carb food"),
  180. items: type(of: self).other,
  181. indexSymbol: "⋯ "
  182. )
  183. ]
  184. }
  185. }