| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- //
- // FoodEmojiDataSource.swift
- // LoopKit
- //
- // Copyright © 2017 LoopKit Authors. All rights reserved.
- //
- public func CarbAbsorptionInputController() -> EmojiInputController {
- return EmojiInputController.instance(withEmojis: FoodEmojiDataSource())
- }
- private class FoodEmojiDataSource: EmojiDataSource {
- private static let fast: [String] = {
- var fast = [
- "🍭", // lollipop
- "🧃", // juice box
- "🥤", // cup with straw (soda)
- "🍬", // candy
- "🍯", // honey pot
- "🍇", // grapes
- "🫐", // blueberries
- "🍈", // melon
- "🍉", // watermelon
- "🍊", // tangerine
- "🍋", // lemon
- "🍌", // banana
- "🍍", // pineapple
- "🍎", // red apple
- "🍏", // green apple
- "🍐", // pear
- "🍑", // peach
- "🍒", // cherries
- "🍓", // strawberry
- "🥝", // kiwi fruit
- "🥭", // mango
- "🌽", // ear of corn
- "🍿", // popcorn
- "🍘", // rice cracker
- "🍡", // dango
- "🍦", // soft ice cream
- "🍧", // shaved ice
- "🎂", // birthday cake
- "🥠", // fortune cookie
- "☕️", // coffee
- "🫖" // tea
- ]
- return fast
- }()
- private static let medium: [String] = {
- var medium = [
- "🌮", // taco
- "🍟", // french fries
- "🍳", // cooking
- "🍲", // pot of food
- "🥘", // pan of food
- "🍱", // bento box
- "🍛", // curry rice
- "🍜", // steaming bowl (ramen / noodle soup)
- "🍠", // roasted sweet potato
- "🍤", // fried shrimp
- "🦪", // oyster
- "🍥", // fish cake with swirl
- "🥪", // sandwich
- "🥙", // pita sandwich
- "🧆", // falafel
- "🫔", // tamale
- "🥫", // canned food
- "🥟", // dumpling
- "🥡", // takeout box
- "🍢", // oden
- "🍣", // sushi
- "🍅", // tomato
- "🥔", // potato
- "🥕", // carrot
- "🌶", // hot pepper
- "🫑", // bell pepper
- "🧅", // onion
- "🧄", // garlic
- "🥔", // potato
- "🥒", // cucumber
- "🥗", // green salad
- "🥬", // leafy green
- "🍄", // mushroom
- "🥦", // broccoli
- "🍆", // eggplant
- "🫘", // beans
- "🥥", // coconut
- "🍞", // bread
- "🥐", // croissant
- "🥖", // baguette bread
- "🥯", // bagel
- "🫓", // flat bread
- "🥨", // pretzel
- "🥞", // pancakes
- "🧇", // waffle
- "🍙", // rice ball
- "🍚", // cooked rice
- "🍼", // baby bottle
- "🥛", // glass of milk
- "🍮", // custard
- "🥧", // pie
- "🍨", // ice cream
- "🍩", // doughnut
- "🍪", // cookie
- "🧁", // cupcake
- "🥮", // moon cake
- "🍰", // shortcake
- "🍫", // chocolate bar
- "🧋", // bubble tea
- ]
- return medium
- }()
- private static let slow: [String] = {
- var slow = [
- "🍕", // pizza
- "🥑", // avocado
- "🥚", // egg
- "🥜", // peanuts
- "🌰", // chestnut
- "🧀", // cheese wedge
- "🫕", // fondue
- "🍖", // meat on bone
- "🍗", // poultry leg
- "🥓", // bacon
- "🍔", // hamburger
- "🌭", // hot dog
- "🌯", // burrito
- "🍝", // spaghetti
- "🥩", // cut of meat
- "🧈", // butter
- "🦴", // bone
- ]
- return slow
- }()
- private static let other: [String] = {
- var other = [
- "🍶", // sake
- "🍾", // bottle with popping cork
- "🍷", // wine glass
- "🍸", // cocktail glass
- "🍺", // beer mug
- "🍻", // clinking beer mugs
- "🥂", // clinking glasses
- "🥃", // tumbler glass
- "🍹", // tropical drink
- "🧉", // mate
- "🫗", // pouring liquid
- "🥣", // bowl with spoon
- "🥤", // cup with straw
- "🥢", // chopsticks
- "🍵", // teacup without handle
- "🍴", // fork and knife
- "🍽", // fork and knife with plate
- "🥄", // spoon
- "🫙", // jar
- "🧊", // ice cube
- "🧂", // salt
- "1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣",
- "6️⃣", "7️⃣", "8️⃣", "9️⃣", "🔟"
- ]
- return other
- }()
- let sections: [EmojiSection]
- init() {
- sections = [
- EmojiSection(
- title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
- items: type(of: self).fast,
- indexSymbol: " 🍭 "
- ),
- EmojiSection(
- title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
- items: type(of: self).medium,
- indexSymbol: "🌮"
- ),
- EmojiSection(
- title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
- items: type(of: self).slow,
- indexSymbol: "🍕"
- ),
- EmojiSection(
- title: LocalizedString("Other", comment: "Section title for no-carb food"),
- items: type(of: self).other,
- indexSymbol: "⋯ "
- )
- ]
- }
- }
|