# - Style sorter - #

# -- data -- #

# - Style 12 - #

# ipa
ipa = "IPA"
ipa_american      = "American IPA"
ipa_american_dipa = "American Double - Imperial IPA"
ipa_english_ipa   = "English India Pale Ale (IPA)"
ipa_belgian       = "Belgian IPA"
ipa_american_white= "American White IPA"
ipa_ls = [ipa_american, ipa_american_dipa, ipa_american_white, ipa_english_ipa, ipa_belgian, ipa_american_white]

# pale ale
pale = "Pale Ale"
pale_american       = "American Pale Ale (APA)"
pale_belgian        = "Belgian Pale Ale"
pale_american_pils  = "American Pilsner"
pale_wheat          = "Wheat Ale"
pale_american_wheat = "American Pale Wheat Ale"
pale_american_blonde= "American Blonde Ale"
pale_english_mild   = "English Pale Mild Ale"
pale_english        = "English Pale Ale"
pale_cream          = "Cream Ale"
pale_ls = [pale_american, pale_belgian, pale_american_pils, pale_wheat, pale_american_wheat, pale_american_blonde,
           pale_english_mild, pale_english, pale_cream]

# dark
dark = "Dark Ale"
dark_english_brown  = "English Brown Ale"
dark_american_amber = "American Amber - Red Ale"
dark_american_brown = "American Brown Ale"
dark_american_black = "American Black Ale"
dark_english_mild   = "English Dark Mild Ale"
dark_winter         = "Winter Warmer"
dark_american_wheat = "American Dark Wheat Ale"
dark_flanders_red   = "Flanders Red Ale"
dark_ls = [dark_english_brown, dark_american_amber, dark_american_brown, dark_american_black, dark_english_mild,
           dark_winter, dark_american_wheat, dark_flanders_red]

# strong
strong = "Strong Ale"
strong_old            = "Old Ale"
strong_scotch         = "Scotch Ale - Wee Heavy"
strong_american       = "American Strong Ale"
strong_english        = "English Strong Ale"
strong_scottish       = "Scottish Ale"
strong_american_pils  = "American Double - Imperial Pilsner"
strong_english_barley = "English Barleywine"
strong_american_barley= "American Barleywine"
strong_ls = [strong_old, strong_scotch, strong_american, strong_english, strong_scottish, strong_american_pils,
             strong_english_barley, strong_american_barley]

# ale - other
ale = "Ale - Other"
ale_pumpkin     = "Pumpkin Ale"
ale_saison      = "Saison - Farmhouse Ale"
ale_wild        = "American Wild Ale"
ale_garde       = "Bière de Garde"
ale_roggenbier  = "Roggenbier"
ale_shandy      = "Shandy"
ale_ls = [ale_pumpkin, ale_saison, ale_wild, ale_garde, ale_roggenbier, ale_shandy]

# other
etc = "Other"
etc_rye         = "Rye Beer"
etc_rauchbier   = "Rauchbier"
etc_radler      = "Radler"
etc_spiced      = "Herbed - Spiced Beer"
etc_other       = "Other"
etc_chile       = "Chile Beer"
etc_smoked      = "Smoked Beer"
etc_grisette    = "Grisette"
etc_ls = [etc_rye, etc_rauchbier, etc_radler, etc_spiced, etc_other, etc_chile, etc_smoked, etc_grisette]

# lager
lager = "Lager"
lager_american_pale     = "American Pale Lager"
lager_american_ipl      = "American India Pale Lager"
lager_steam             = "California Common - Steam Beer"
lager_american_red      = "American Amber - Red Lager"
lager_euro              = "Euro Pale Lager"
lager_american_adjunct  = "American Adjunct Lager"
lager_light             = "Light Lager"
lager_vienna            = "Vienna Lager"
lager_euro_dark         = "Euro Dark Lager"
lager_ls = [lager_american_pale, lager_american_ipl, lager_steam, lager_american_red, lager_euro,
            lager_american_adjunct, lager_light, lager_vienna, lager_euro_dark]

# stout porter
stout = "Stout - Porter"
stout_milk              = "Milk - Sweet Stout"
stout_american_imperial = "American Double - Imperial Stout"
stout_russian_imperial  = "Russian Imperial Stout"
stout_american          = "American Stout"
stout_oatmeal           = "Oatmeal Stout"
stout_english           = "English Stout"
stout_foreign           = "Foreign - Export Stout"
stout_irish_dry         = "Irish Dry Stout"
stout_porter_baltic     = "Baltic Porter"
stout_ls = [stout_milk, stout_american_imperial, stout_russian_imperial, stout_american, stout_oatmeal,
            stout_english, stout_foreign, stout_irish_dry, stout_porter_baltic]

# sour
sour = "Sour"
sour_esb        = "Extra Special - Strong Bitter"
sour_gose       = "Gose"
sour_english    = "English Bitter"
sour_flanders   = "Flanders Oud Bruin"
sour_fruit      = "Fruit - Vegetable Beer"
sour_ls = [sour_esb, sour_gose, sour_english, sour_flanders, sour_fruit]

# german lager
german_lager = "German Lager"
german_lager_pils       = "German Pilsener"
german_lager_keller     = "Keller Bier - Zwickel Bier"
german_lager_bock_doppel= "Doppelbock"
german_lager_helles     = "Munich Helles Lager"
german_lager_marzen     = "Märzen - Oktoberfest"
german_lager_bock_helles= "Maibock - Helles Bock"
german_lager_bock       = "Bock"
german_lager_shwarzbier = "Schwarzbier"
german_lager_dortmunder = "Dortmunder - Export Lager"
german_lager_dunkel     = "Munich Dunkel Lager"
german_lager_ls = [german_lager_pils, german_lager_keller, german_lager_bock_doppel, german_lager_helles,
                   german_lager_marzen, german_lager_bock_helles, german_lager_bock, german_lager_shwarzbier,
                   german_lager_dortmunder, german_lager_dunkel]

# german ale
german_ale = "German Ale"
german_ale_altbier  = "Altbier"
german_ale_dunkel   = "Dunkelweizen"
german_ale_kolsch   = "Kölsch"
german_ale_hefe     = "Hefeweizen"
german_ale_ls = [german_ale_altbier, german_ale_dunkel, german_ale_kolsch, german_ale_hefe ]

# belgian ale
belgian = "Belgian"
belgian_pale        = "Belgian Pale Ale"
belgian_single      = "Abbey Single Ale"
belgian_double      = "Dubbel"
belgian_triple      = "Tripel"
belgian_quad        = "Quadrupel (Quad)"
belgian_witbier     = "Witbier"
belgian_strong_pale = "Belgian Strong Pale Ale"
belgian_dark        = "Belgian Dark Ale"
belgian_strong_dark = "Belgian Strong Dark Ale"
belgian_ls = [belgian_pale, belgian_single, belgian_double, belgian_triple, belgian_quad, belgian_witbier,
              belgian_strong_pale, belgian_dark, belgian_strong_dark]

# - style_05 - #

# ale (generic)
ALE = "Ale"
ALE_ls = [pale, ale, belgian, german_ale]

# strong ale (generic)
STRONG = "Strong Ale"
STRONG_ls = [ipa, strong]

# dark (generic)
DARK = "Dark"
DARK_ls = [dark, stout]

# lager (generic)
LAGER = "Lager"
LAGER_ls = [lager, german_lager]

# other (generic)
OTHER = "Other"
OTHER_ls = [sour, etc]


# -- functions -- #


def get_style12(str):
    """reduce style variance from 100 to 12"""
    if str in ipa_ls:
        return ipa
    elif str in pale_ls:
        return pale
    elif str in dark_ls:
        return dark
    elif str in strong_ls:
        return strong
    elif str in ale_ls:
        return ale
    elif str in etc_ls:
        return etc
    elif str in lager_ls:
        return lager
    elif str in stout_ls:
        return stout
    elif str in sour_ls:
        return sour
    elif str in german_lager_ls:
        return german_lager
    elif str in german_ale_ls:
        return german_ale
    elif str in belgian_ls:
        return belgian
    else:
        return None


def get_style05(str):
    """reduce style variance from 12 to 5"""
    if str in ALE_ls:
        return ALE
    elif str in STRONG_ls:
        return STRONG
    elif str in DARK_ls:
        return DARK
    elif str in LAGER_ls:
        return LAGER
    elif str in OTHER_ls:
        return OTHER
    else:
        return None
