using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class UIToLogic : MonoBehaviour
{
    [SerializeField]
    private TMP_InputField _arcanaEmblems;

    [SerializeField]
    private TMP_InputField _chronoEmblems;

    [SerializeField]
    private TMP_InputField _dragonEmblems;

    [SerializeField]
    private TMP_InputField _druidEmblems;

    [SerializeField]
    private TMP_InputField _eldrichtEmblems;

    [SerializeField]
    private TMP_InputField _faerieEmblems;

    [SerializeField]
    private TMP_InputField _frostEmblems;

    [SerializeField]
    private TMP_InputField _honeymancyEmblems;

    [SerializeField]
    private TMP_InputField _portalEmblems;

    [SerializeField]
    private TMP_InputField _pyroEmblems;

    [SerializeField]
    private TMP_InputField _sugarcraftEmblems;

    [SerializeField]
    private TMP_InputField _witchcraftEmblems;

    [SerializeField]
    private TMP_InputField _bastionEmblems;

    [SerializeField]
    private TMP_InputField _blasterEmblems;

    [SerializeField]
    private TMP_InputField _hunterEmblems;

    [SerializeField]
    private TMP_InputField _incantatorEmblems;

    [SerializeField]
    private TMP_InputField _mageEmblems;

    [SerializeField]
    private TMP_InputField _multistrikerEmblems;

    [SerializeField]
    private TMP_InputField _preserverEmblems;

    [SerializeField]
    private TMP_InputField _scholarEmblems;

    [SerializeField]
    private TMP_InputField _shapeshifterEmblems;

    [SerializeField]
    private TMP_InputField _vanguardEmblems;

    [SerializeField]
    private TMP_InputField _warriorEmblems;

    // Start is called before the first frame update
    void Start() { }

    public Dictionary<TraitsEnum, int> GetEmblems()
    {
        Dictionary<TraitsEnum, int> emblems = new Dictionary<TraitsEnum, int>();
        emblems[TraitsEnum.ARCANA] = int.Parse(_arcanaEmblems.text);
        emblems[TraitsEnum.CHRONO] = int.Parse(_chronoEmblems.text);
        emblems[TraitsEnum.DRAGON] = int.Parse(_dragonEmblems.text);
        emblems[TraitsEnum.DRUID] = int.Parse(_druidEmblems.text);
        emblems[TraitsEnum.ELDRICHT] = int.Parse(_eldrichtEmblems.text);
        emblems[TraitsEnum.FAERIE] = int.Parse(_faerieEmblems.text);
        emblems[TraitsEnum.FROST] = int.Parse(_frostEmblems.text);
        emblems[TraitsEnum.HONEYMANCY] = int.Parse(_honeymancyEmblems.text);
        emblems[TraitsEnum.PORTAL] = int.Parse(_portalEmblems.text);
        emblems[TraitsEnum.PYRO] = int.Parse(_pyroEmblems.text);
        emblems[TraitsEnum.SUGARCRAFT] = int.Parse(_sugarcraftEmblems.text);
        emblems[TraitsEnum.WITCHCRAFT] = int.Parse(_witchcraftEmblems.text);
        emblems[TraitsEnum.BASTION] = int.Parse(_bastionEmblems.text);
        emblems[TraitsEnum.BLASTER] = int.Parse(_blasterEmblems.text);
        emblems[TraitsEnum.HUNTER] = int.Parse(_hunterEmblems.text);
        emblems[TraitsEnum.INCANTATOR] = int.Parse(_incantatorEmblems.text);
        emblems[TraitsEnum.MAGE] = int.Parse(_mageEmblems.text);
        emblems[TraitsEnum.MULTISTRIKER] = int.Parse(_multistrikerEmblems.text);
        emblems[TraitsEnum.PRESERVER] = int.Parse(_preserverEmblems.text);
        emblems[TraitsEnum.SCHOLAR] = int.Parse(_scholarEmblems.text);
        emblems[TraitsEnum.SHAPESHIFTER] = int.Parse(_shapeshifterEmblems.text);
        emblems[TraitsEnum.VANGUARD] = int.Parse(_vanguardEmblems.text);
        emblems[TraitsEnum.WARRIOR] = int.Parse(_warriorEmblems.text);
        return emblems;
    }
    public void Reset()
    {
        _arcanaEmblems.text = "0";
        _chronoEmblems.text = "0";
        _dragonEmblems.text = "0";
        _druidEmblems.text = "0";
        _eldrichtEmblems.text = "0";
        _faerieEmblems.text = "0";
        _frostEmblems.text = "0";
        _honeymancyEmblems.text = "0";
        _portalEmblems.text = "0";
        _pyroEmblems.text = "0";
        _sugarcraftEmblems.text = "0";
        _witchcraftEmblems.text = "0";
        _bastionEmblems.text = "0";
        _blasterEmblems.text = "0";
        _hunterEmblems.text = "0";
        _incantatorEmblems.text = "0";
        _mageEmblems.text = "0";
        _multistrikerEmblems.text = "0";
        _preserverEmblems.text = "0";
        _scholarEmblems.text = "0";
        _shapeshifterEmblems.text = "0";
        _vanguardEmblems.text = "0";
        _warriorEmblems.text = "0";
    }
}
