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. }