FoodEmojiDataSource.swift 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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. "🍭", // 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. "🥔", // potato
  78. "🥒", // cucumber
  79. "🥗", // green salad
  80. "🥬", // leafy green
  81. "🍄", // mushroom
  82. "🥦", // broccoli
  83. "🍆", // eggplant
  84. "🫘", // beans
  85. "🥥", // coconut
  86. "🍞", // bread
  87. "🥐", // croissant
  88. "🥖", // baguette bread
  89. "🥯", // bagel
  90. "🫓", // flat bread
  91. "🥨", // pretzel
  92. "🥞", // pancakes
  93. "🧇", // waffle
  94. "🍙", // rice ball
  95. "🍚", // cooked rice
  96. "🍼", // baby bottle
  97. "🥛", // glass of milk
  98. "🍮", // custard
  99. "🥧", // pie
  100. "🍨", // ice cream
  101. "🍩", // doughnut
  102. "🍪", // cookie
  103. "🧁", // cupcake
  104. "🥮", // moon cake
  105. "🍰", // shortcake
  106. "🍫", // chocolate bar
  107. "🧋", // bubble tea
  108. ]
  109. return medium
  110. }()
  111. private static let slow: [String] = {
  112. var slow = [
  113. "🍕", // pizza
  114. "🥑", // avocado
  115. "🥚", // egg
  116. "🥜", // peanuts
  117. "🌰", // chestnut
  118. "🧀", // cheese wedge
  119. "🫕", // fondue
  120. "🍖", // meat on bone
  121. "🍗", // poultry leg
  122. "🥓", // bacon
  123. "🍔", // hamburger
  124. "🌭", // hot dog
  125. "🌯", // burrito
  126. "🍝", // spaghetti
  127. "🥩", // cut of meat
  128. "🧈", // butter
  129. "🦴", // bone
  130. ]
  131. return slow
  132. }()
  133. private static let other: [String] = {
  134. var other = [
  135. "🍶", // sake
  136. "🍾", // bottle with popping cork
  137. "🍷", // wine glass
  138. "🍸", // cocktail glass
  139. "🍺", // beer mug
  140. "🍻", // clinking beer mugs
  141. "🥂", // clinking glasses
  142. "🥃", // tumbler glass
  143. "🍹", // tropical drink
  144. "🧉", // mate
  145. "🫗", // pouring liquid
  146. "🥣", // bowl with spoon
  147. "🥤", // cup with straw
  148. "🥢", // chopsticks
  149. "🍵", // teacup without handle
  150. "🍴", // fork and knife
  151. "🍽", // fork and knife with plate
  152. "🥄", // spoon
  153. "🫙", // jar
  154. "🧊", // ice cube
  155. "🧂", // salt
  156. "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣",
  157. "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"
  158. ]
  159. return other
  160. }()
  161. let sections: [EmojiSection]
  162. init() {
  163. sections = [
  164. EmojiSection(
  165. title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
  166. items: type(of: self).fast,
  167. indexSymbol: " 🍭 "
  168. ),
  169. EmojiSection(
  170. title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
  171. items: type(of: self).medium,
  172. indexSymbol: "🌮"
  173. ),
  174. EmojiSection(
  175. title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
  176. items: type(of: self).slow,
  177. indexSymbol: "🍕"
  178. ),
  179. EmojiSection(
  180. title: LocalizedString("Other", comment: "Section title for no-carb food"),
  181. items: type(of: self).other,
  182. indexSymbol: "⋯ "
  183. )
  184. ]
  185. }
  186. }