FoodEmojiDataSource.swift 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. "๐Ÿฏ", "๐Ÿผ", "๐Ÿฅ›", "โ˜•๏ธ", "๐Ÿต",
  20. "๐Ÿฅฅ", "๐Ÿฅฆ", "๐Ÿฅจ", "๐Ÿฅ ", "๐Ÿฅง",
  21. ]
  22. return fast
  23. }()
  24. private static let medium: [String] = {
  25. var medium = [
  26. "๐ŸŒฎ", "๐Ÿ†", "๐ŸŸ", "๐Ÿณ", "๐Ÿฒ", "๐Ÿฑ", "๐Ÿ›",
  27. "๐Ÿœ", "๐Ÿ ", "๐Ÿค", "๐Ÿฅ", "๐Ÿน",
  28. "๐Ÿฅช", "๐Ÿฅซ", "๐ŸฅŸ", "๐Ÿฅก",
  29. ]
  30. return medium
  31. }()
  32. private static let slow: [String] = {
  33. var slow = [
  34. "๐Ÿ•", "๐Ÿฅ‘", "๐Ÿฅœ", "๐ŸŒฐ", "๐Ÿง€", "๐Ÿ–", "๐Ÿ—", "๐Ÿฅ“",
  35. "๐Ÿ”", "๐ŸŒญ", "๐ŸŒฏ", "๐Ÿ", "๐Ÿฅฉ"
  36. ]
  37. return slow
  38. }()
  39. private static let other: [String] = {
  40. var other = [
  41. "๐Ÿถ", "๐Ÿพ", "๐Ÿท", "๐Ÿธ", "๐Ÿบ", "๐Ÿป", "๐Ÿฅ‚", "๐Ÿฅƒ",
  42. "๐Ÿฅฃ", "๐Ÿฅค", "๐Ÿฅข",
  43. "1๏ธโƒฃ", "2๏ธโƒฃ", "3๏ธโƒฃ", "4๏ธโƒฃ", "5๏ธโƒฃ",
  44. "6๏ธโƒฃ", "7๏ธโƒฃ", "8๏ธโƒฃ", "9๏ธโƒฃ", "๐Ÿ”Ÿ"
  45. ]
  46. return other
  47. }()
  48. let sections: [EmojiSection]
  49. init() {
  50. sections = [
  51. EmojiSection(
  52. title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
  53. items: type(of: self).fast,
  54. indexSymbol: " ๐Ÿญ "
  55. ),
  56. EmojiSection(
  57. title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
  58. items: type(of: self).medium,
  59. indexSymbol: "๐ŸŒฎ"
  60. ),
  61. EmojiSection(
  62. title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
  63. items: type(of: self).slow,
  64. indexSymbol: "๐Ÿ•"
  65. ),
  66. EmojiSection(
  67. title: LocalizedString("Other", comment: "Section title for no-carb food"),
  68. items: type(of: self).other,
  69. indexSymbol: "โ‹ฏ "
  70. )
  71. ]
  72. }
  73. }