//
//  Greens.swift
//  GreensChronics
//
//  Created by Roman on 20.07.21.
//

import Foundation

class GreensModel: ObservableObject {
    @Published var months: [Month] = [
        Month.january, Month.february, Month.march,
        Month.april, Month.may, Month.june,
        Month.july, Month.august, Month.september,
        Month.october, Month.november, Month.december
    ]
    
    var greensData: [Greens] = [
        // greens
        Greens(name: "artichoke", description: "artichokeDescription", monthsFresh: [7,8,9], monthsStock: []),
        Greens(name: "aubergine", description: "aubergineDescription", monthsFresh: [6,7,8,9,10], monthsStock: []),
        Greens(name: "cauliflower", description: "cauliflowerDescription", monthsFresh: [5,6,7,8,9,10,11], monthsStock: []),
        Greens(name: "beans", description: "beansDescription", monthsFresh: [6,7,8], monthsStock: []),
        Greens(name: "greenBeans", description: "greenBeansDescription", monthsFresh: [6,7,8,9,10], monthsStock: []),
        Greens(name: "broccoli", description: "broccoliDescription", monthsFresh: [6,7,8,9,10,11], monthsStock: []),
        Greens(name: "butternutSquash", description: "butternutSquashDescription", monthsFresh: [9,10], monthsStock: [1,2,3,11,12]),
        Greens(name: "mushrooms", description: "mushroomsDescription", monthsFresh: [1,2,3,4,5,6,7,8,9,10,11,12], monthsStock: []),
        Greens(name: "chineseCabbage", description: "chineseCabbageDescription", monthsFresh: [1,2,5,6,7,8,9,10,11,12], monthsStock: [3,4]),
        Greens(name: "pea", description: "peaDescription", monthsFresh: [6,7,8], monthsStock: []),
        // 10
        Greens(name: "fennel", description: "fennelDescription", monthsFresh: [6,7,8,9,10], monthsStock: []),
        Greens(name: "springOnion", description: "springOnionDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        Greens(name: "kale", description: "kaleDescription", monthsFresh: [1,10,11,12], monthsStock: []),
        Greens(name: "hokkaido", description: "hokkaidoDescription", monthsFresh: [8,9,10], monthsStock: [1,2,11,12]),
        Greens(name: "potato", description: "potatoDescription", monthsFresh: [6,7,8,9,10], monthsStock: [1,2,3,4,5,11,12]),
        Greens(name: "celeriac", description: "celeriacDescription", monthsFresh: [6,7,8,9,10,11,12], monthsStock: [1,2,3,4,5]),
        Greens(name: "kohlrabi", description: "kohlrabiDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        Greens(name: "pumpkin", description: "pumpkinDescription", monthsFresh: [8,9,10,11], monthsStock: [1,2,3,12]),
        Greens(name: "turnip", description: "turnipDescription", monthsFresh: [5,6,7], monthsStock: []),
        Greens(name: "corn", description: "cornDescription", monthsFresh: [7,8,9,10], monthsStock: []),
        // 20
        Greens(name: "swissChard", description: "swissChardDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        Greens(name: "horseradish", description: "horseradishDescription", monthsFresh: [1,10,11,12], monthsStock: []),
        Greens(name: "carrot", description: "carrotDescription", monthsFresh: [7,8,9,10,11], monthsStock: [1,2,3,4,5,6,12]),
        Greens(name: "pakChoi", description: "pakChoiDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        Greens(name: "paprika", description: "paprikaDescription", monthsFresh: [6,7,8,9,10], monthsStock: []),
        Greens(name: "pastinake", description: "pastinakeDescription", monthsFresh: [1,2,11,12], monthsStock: []),
        Greens(name: "parsleyRoot", description: "parsleyRootDescription", monthsFresh: [1,2,11,12], monthsStock: []),
        Greens(name: "chanterelles", description: "chanterellesDescription", monthsFresh: [7,8,9,10], monthsStock: []),
        Greens(name: "leek", description: "leekDescription", monthsFresh: [8,9,10,11,12], monthsStock: [1,2,3,4,5,6,7]),
        Greens(name: "purslane", description: "purslaneDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        // 30
        Greens(name: "radishes", description: "radishesDescription", monthsFresh: [4,5,6,7,8,9,10], monthsStock: []),
        Greens(name: "radish", description: "radishDescription", monthsFresh: [5,6,7,8,9,10,11], monthsStock: [1,2,12]),
        Greens(name: "romanesco", description: "romanescoDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: []),
        Greens(name: "brusselsSprouts", description: "brusselsSproutsDescription", monthsFresh: [1,10,11,12], monthsStock: []),
        Greens(name: "beetroot", description: "beetrootDescription", monthsFresh: [9,10,11,12], monthsStock: [1,2,3]),
        Greens(name: "redCabbage", description: "redCabbageDescription", monthsFresh: [5,6,7,8,9,10,11], monthsStock: [1,2,3,4,12]),
        Greens(name: "cucumber", description: "cucumberDescription", monthsFresh: [5,6,7,8], monthsStock: []),
        Greens(name: "shallot", description: "shallotDescription", monthsFresh: [7,8,9], monthsStock: [1,2,3,4,5,6,10,11,12]),
        Greens(name: "spaghettiSquash", description: "spaghettiSquashDescription", monthsFresh: [9,10,11], monthsStock: [1,2,3,12]),
        Greens(name: "asparagus", description: "asparagusDescription", monthsFresh: [4,5,6], monthsStock: []),
        // 40
        Greens(name: "spinach", description: "spinachDescription", monthsFresh: [4,5,6,7,8,9,10], monthsStock: []),
        Greens(name: "pointedCabbage", description: "pointedCabbageDescription", monthsFresh: [5,6,7,8,9,10], monthsStock: [1,2,11,12]),
        Greens(name: "celery", description: "celeryDescription", monthsFresh: [1,2,3,4,5,6,7,8,9,10,11,12], monthsStock: []),
        Greens(name: "rutabaga", description: "rutabagaDescription", monthsFresh: [1,2,11,12], monthsStock: []),
        Greens(name: "porcini", description: "porciniDescription", monthsFresh: [8,9,10], monthsStock: []),
        Greens(name: "sweetPotato", description: "sweetPotatoDescription", monthsFresh: [9,10], monthsStock: []),
        Greens(name: "tomato", description: "tomatoDescription", monthsFresh: [7,8,9], monthsStock: []),
        Greens(name: "whiteCabbage", description: "whiteCabbageDescription", monthsFresh: [9,10,11], monthsStock: [1,2,3,4,5,6,7,8,12]),
        Greens(name: "savoyCabbage", description: "savoyCabbageDescription", monthsFresh: [1,2,6,7,8,9,10,11,12], monthsStock: [3,4,5]),
        Greens(name: "courgette", description: "courgetteDescription", monthsFresh: [6,7,8,9], monthsStock: []),
        // 50
        Greens(name: "snapPea", description: "snapPeaDescription", monthsFresh: [5,6], monthsStock: []),
        Greens(name: "onion", description: "onionDescription", monthsFresh: [7,8,9,10], monthsStock: [1,2,3,4,5,6,11,12])
        // Fruits
        
    ]
}

struct Greens: Codable, Identifiable {
    var id: String = UUID().uuidString
    var name: String
    var description: String
    var monthsFresh: [Int]
    var monthsStock: [Int]
}



#if DEBUG
let testGreens = [
    Greens(name: "Aubergine", description: "123", monthsFresh: [1,2,3], monthsStock: []),
    Greens(name: "Blumenkohl", description: "456", monthsFresh: [4,5,6], monthsStock: []),
    Greens(name: "Grüne Bohnen", description: "789", monthsFresh: [7,8,9], monthsStock: [])
]
#endif
