"""Seed the Fiorentine Minchiate deck (78 cards)."""
from django.db import migrations

# (arcana, suit, number, name, slug, correspondence, group, icon, keywords_upright, keywords_reversed)
FIORENTINE_CARDS = [
    ("MAJOR","",0,"The Fool","the-fool","","","",["beginnings","spontaneity","freedom"],["recklessness","naivety","risk"]),
    ("MAJOR","",1,"The Magician","the-magician","","","",["willpower","skill","resourcefulness"],["manipulation","untapped potential","deceit"]),
    ("MAJOR","",2,"The High Priestess","the-high-priestess","","","",["intuition","mystery","inner knowledge"],["secrets","disconnection","withdrawal"]),
    ("MAJOR","",3,"The Empress","the-empress","","","",["fertility","abundance","nurturing"],["dependence","smothering","creative block"]),
    ("MAJOR","",4,"The Emperor","the-emperor","","","",["authority","structure","stability"],["rigidity","domination","inflexibility"]),
    ("MAJOR","",5,"The Hierophant","the-hierophant","","","",["tradition","conformity","institutions"],["rebellion","unconventionality","challenge"]),
    ("MAJOR","",6,"The Lovers","the-lovers","","","",["love","harmony","choice"],["disharmony","imbalance","misalignment"]),
    ("MAJOR","",7,"The Chariot","the-chariot","","","",["control","willpower","victory"],["aggression","lack of direction","defeat"]),
    ("MAJOR","",8,"Strength","strength","","","",["courage","patience","compassion"],["self-doubt","weakness","insecurity"]),
    ("MAJOR","",9,"The Hermit","the-hermit","","","",["introspection","guidance","solitude"],["isolation","loneliness","withdrawal"]),
    ("MAJOR","",10,"Wheel of Fortune","wheel-of-fortune","","","",["change","cycles","fate"],["bad luck","resistance","clinging to control"]),
    ("MAJOR","",11,"Justice","justice","","","",["fairness","truth","cause and effect"],["injustice","dishonesty","avoidance"]),
    ("MAJOR","",12,"The Hanged Man","the-hanged-man","","","",["pause","surrender","new perspective"],["stalling","resistance","indecision"]),
    ("MAJOR","",13,"Death","death","","","",["endings","transition","transformation"],["fear of change","stagnation","resistance"]),
    ("MAJOR","",14,"Temperance","temperance","","","",["balance","patience","moderation"],["imbalance","excess","lack of harmony"]),
    ("MAJOR","",15,"The Devil","the-devil","","","",["bondage","materialism","shadow self"],["detachment","freedom","releasing control"]),
    ("MAJOR","",16,"The Tower","the-tower","","","",["sudden change","upheaval","revelation"],["avoidance","fear of change","delaying disaster"]),
    ("MAJOR","",17,"The Star","the-star","","","",["hope","renewal","inspiration"],["despair","insecurity","hopelessness"]),
    ("MAJOR","",18,"The Moon","the-moon","","","",["illusion","fear","the unconscious"],["confusion","misinterpretation","clarity"]),
    ("MAJOR","",19,"The Sun","the-sun","","","",["positivity","success","vitality"],["negativity","depression","sadness"]),
    ("MAJOR","",20,"Judgement","judgement","","","",["reflection","reckoning","absolution"],["self-doubt","lack of self-awareness","loathing"]),
    ("MAJOR","",21,"The World","the-world","","","",["completion","integration","accomplishment"],["incompletion","no closure","shortcuts"]),
    ("MINOR","CUPS",1,"Ace of Cups","ace-of-cups","","","",["new feelings","intuition","opportunity"],["blocked creativity","emptiness","hesitation"]),
    ("MINOR","CUPS",2,"Two of Cups","two-of-cups","","","",["partnership","unity","celebration"],["imbalance","broken bonds","misalignment"]),
    ("MINOR","CUPS",3,"Three of Cups","three-of-cups","","","",["creativity","community","abundance"],["independence","isolation","looking inward"]),
    ("MINOR","CUPS",4,"Four of Cups","four-of-cups","","","",["contemplation","apathy","reevaluation"],["withdrawal","boredom","seeking motivation"]),
    ("MINOR","CUPS",5,"Five of Cups","five-of-cups","","","",["loss","grief","disappointment"],["acceptance","moving on","forgiveness"]),
    ("MINOR","CUPS",6,"Six of Cups","six-of-cups","","","",["nostalgia","reunion","joy"],["living in the past","naivety","unrealistic"]),
    ("MINOR","CUPS",7,"Seven of Cups","seven-of-cups","","","",["illusion","fantasy","wishful thinking"],["alignment","clarity","sobriety"]),
    ("MINOR","CUPS",8,"Eight of Cups","eight-of-cups","","","",["disappointment","abandonment","walking away"],["hopelessness","aimlessness","stagnation"]),
    ("MINOR","CUPS",9,"Nine of Cups","nine-of-cups","","","",["contentment","fulfilment","satisfaction"],["inner happiness","materialism","indulgence"]),
    ("MINOR","CUPS",10,"Ten of Cups","ten-of-cups","","","",["divine love","bliss","fulfilment"],["inner happiness","alignment","personal values"]),
    ("MINOR","CUPS",11,"Page of Cups","page-of-cups","","","",["sensitivity","creativity","intuition"],["insecurity","emotional immaturity","creative blocks"]),
    ("MINOR","CUPS",12,"Knight of Cups","knight-of-cups","","","",["compassion","romanticism","diplomacy"],["moodiness","emotional manipulation","deception"]),
    ("MINOR","CUPS",13,"Queen of Cups","queen-of-cups","","","",["compassion","empathy","nurturing"],["emotional insecurity","over-giving","neglect"]),
    ("MINOR","CUPS",14,"King of Cups","king-of-cups","","","",["emotional maturity","diplomacy","wisdom"],["manipulation","moodiness","coldness"]),
    ("MINOR","PENTACLES",1,"Ace of Pentacles","ace-of-pentacles","","","",["opportunity","new venture","manifestation"],["lost opportunity","lack of planning","scarcity"]),
    ("MINOR","PENTACLES",2,"Two of Pentacles","two-of-pentacles","","","",["juggling resources","flexibility","fun"],["imbalance","disorganisation","overwhelm"]),
    ("MINOR","PENTACLES",3,"Three of Pentacles","three-of-pentacles","","","",["teamwork","building","apprenticeship"],["lack of teamwork","disharmony","misalignment"]),
    ("MINOR","PENTACLES",4,"Four of Pentacles","four-of-pentacles","","","",["stability","security","conservation"],["greed","stinginess","possessiveness"]),
    ("MINOR","PENTACLES",5,"Five of Pentacles","five-of-pentacles","","","",["isolation","insecurity","worry"],["recovery from loss","overcoming hardship"]),
    ("MINOR","PENTACLES",6,"Six of Pentacles","six-of-pentacles","","","",["generosity","charity","community"],["strings attached","power dynamics","inequality"]),
    ("MINOR","PENTACLES",7,"Seven of Pentacles","seven-of-pentacles","","","",["hard work","perseverance","diligence"],["lack of reward","laziness","low quality"]),
    ("MINOR","PENTACLES",8,"Eight of Pentacles","eight-of-pentacles","","","",["apprenticeship","education","skill"],["perfectionism","misdirected activity","misuse"]),
    ("MINOR","PENTACLES",9,"Nine of Pentacles","nine-of-pentacles","","","",["abundance","luxury","self-sufficiency"],["overindulgence","superficiality","materialism"]),
    ("MINOR","PENTACLES",10,"Ten of Pentacles","ten-of-pentacles","","","",["wealth","financial security","achievement"],["financial failure","greed","lost success"]),
    ("MINOR","PENTACLES",11,"Page of Pentacles","page-of-pentacles","","","",["ambition","diligence","management"],["underhandedness","greediness","unethical"]),
    ("MINOR","PENTACLES",12,"Knight of Pentacles","knight-of-pentacles","","","",["hard work","productivity","routine"],["laziness","obsession with work","burnout"]),
    ("MINOR","PENTACLES",13,"Queen of Pentacles","queen-of-pentacles","","","",["nurturing","practical","abundance"],["financial dependence","smothering","insecurity"]),
    ("MINOR","PENTACLES",14,"King of Pentacles","king-of-pentacles","","","",["abundance","prosperity","security"],["greed","indulgence","sensual obsession"]),
    ("MINOR","SWORDS",1,"Ace of Swords","ace-of-swords","","","",["raw power","breakthrough","clarity"],["confusion","brutality","mental chaos"]),
    ("MINOR","SWORDS",2,"Two of Swords","two-of-swords","","","",["difficult choices","stalemate","truce"],["indecision","lies","confusion"]),
    ("MINOR","SWORDS",3,"Three of Swords","three-of-swords","","","",["heartbreak","sorrow","grief"],["recovery","forgiveness","moving on"]),
    ("MINOR","SWORDS",4,"Four of Swords","four-of-swords","","","",["rest","restoration","retreat"],["restlessness","burnout","illness"]),
    ("MINOR","SWORDS",5,"Five of Swords","five-of-swords","","","",["defeat","change","transition"],["resistance to change","inability to move"]),
    ("MINOR","SWORDS",6,"Six of Swords","six-of-swords","","","",["victory","success","ambition"],["an eye for an eye","dishonour","manipulation"]),
    ("MINOR","SWORDS",7,"Seven of Swords","seven-of-swords","","","",["deception","trickery","tactics"],["imposter syndrome","coming clean","rethinking"]),
    ("MINOR","SWORDS",8,"Eight of Swords","eight-of-swords","","","",["restriction","isolation","imprisonment"],["self-limiting beliefs","inner critic","opening up"]),
    ("MINOR","SWORDS",9,"Nine of Swords","nine-of-swords","","","",["anxiety","worry","fear"],["recovery from anxiety","inner turmoil","secrets"]),
    ("MINOR","SWORDS",10,"Ten of Swords","ten-of-swords","","","",["ruin","painful endings","loss"],["recovery","regeneration","resisting an end"]),
    ("MINOR","SWORDS",11,"Page of Swords","page-of-swords","","","",["new ideas","mental agility","curiosity"],["manipulation","all talk no action","ruthlessness"]),
    ("MINOR","SWORDS",12,"Knight of Swords","knight-of-swords","","","",["action","impulsiveness","ambition"],["no direction","disregard for consequences"]),
    ("MINOR","SWORDS",13,"Queen of Swords","queen-of-swords","","","",["clarity","directness","structure"],["coldness","cruelty","manipulation"]),
    ("MINOR","SWORDS",14,"King of Swords","king-of-swords","","","",["mental clarity","truth","authority"],["abuse of power","manipulation","coldness"]),
    ("MINOR","WANDS",1,"Ace of Wands","ace-of-wands","","","",["inspiration","new venture","spark"],["delays","lack of motivation","false start"]),
    ("MINOR","WANDS",2,"Two of Wands","two-of-wands","","","",["planning","progress","decisions"],["impatience","lack of planning","hesitation"]),
    ("MINOR","WANDS",3,"Three of Wands","three-of-wands","","","",["expansion","foresight","enterprise"],["obstacles","lack of foresight","delays"]),
    ("MINOR","WANDS",4,"Four of Wands","four-of-wands","","","",["celebration","harmony","homecoming"],["lack of support","transience","home conflicts"]),
    ("MINOR","WANDS",5,"Five of Wands","five-of-wands","","","",["conflict","competition","tension"],["avoiding conflict","compromise","truce"]),
    ("MINOR","WANDS",6,"Six of Wands","six-of-wands","","","",["victory","recognition","progress"],["excess pride","lack of recognition","fall"]),
    ("MINOR","WANDS",7,"Seven of Wands","seven-of-wands","","","",["challenge","courage","competition"],["anxiety","giving up","overwhelmed"]),
    ("MINOR","WANDS",8,"Eight of Wands","eight-of-wands","","","",["rapid action","adventure","change"],["haste","scattered energy","delays"]),
    ("MINOR","WANDS",9,"Nine of Wands","nine-of-wands","","","",["resilience","persistence","last stand"],["exhaustion","giving up","surrender"]),
    ("MINOR","WANDS",10,"Ten of Wands","ten-of-wands","","","",["completion","celebration","travel"],["burdens","oppression","carrying too much"]),
    ("MINOR","WANDS",11,"Page of Wands","page-of-wands","","","",["exploration","enthusiasm","adventure"],["hasty decisions","scattered energy","immaturity"]),
    ("MINOR","WANDS",12,"Knight of Wands","knight-of-wands","","","",["energy","passion","adventure"],["scattered energy","frustration","aggression"]),
    ("MINOR","WANDS",13,"Queen of Wands","queen-of-wands","","","",["confidence","independence","courage"],["selfishness","jealousy","insecurity"]),
    ("MINOR","WANDS",14,"King of Wands","king-of-wands","","","",["big picture","leadership","vision"],["impulsiveness","haste","overconfidence"]),
]


def seed(apps, schema_editor):
    DeckVariant = apps.get_model('epic', 'DeckVariant')
    TarotCard   = apps.get_model('epic', 'TarotCard')

    deck = DeckVariant.objects.create(
        name='Fiorentine Minchiate',
        slug='fiorentine-minchiate',
        card_count=78,
        is_default=False,
    )
    for arcana, suit, number, name, slug, correspondence, group, icon, kw_up, kw_rev in FIORENTINE_CARDS:
        TarotCard.objects.create(
            deck_variant=deck,
            arcana=arcana,
            suit=suit or None,
            number=number,
            name=name,
            slug=slug,
            correspondence=correspondence,
            group=group,
            icon=icon,
            keywords_upright=kw_up,
            keywords_reversed=kw_rev,
        )


class Migration(migrations.Migration):

    dependencies = [
        ('epic', '0002_initial'),
    ]

    operations = [
        migrations.RunPython(seed, migrations.RunPython.noop),
    ]
