/**
    File        : NewAccountWizard.h
    Description : Wizard for setting up a new account
    Author      : Raymond Marsh
    Created     : 08/01/2009
    Copyright 2009, 2010 Raymond Marsh

    This program is distributed under the terms of the GNU General Public License.
    To view a copy of the license see the file 'copying.txt'

    This file is part of the Ace Personal Finance Assistant Suite.

    Ace Personal Finance Assistant is free software: you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software Foundation, either
    version 3 of the License, or (at your option) any later version.

    Ace Personal Finance Assistant is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along with Ace Personal Finance Assistant.
    If not, see <http://www.gnu.org/licenses/>.
**/

#ifndef NEWACCOUNTWIZARD_H_INCLUDED
#define NEWACCOUNTWIZARD_H_INCLUDED

#include <wx/wizard.h>
#include <wx/sizer.h>
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include <wx/datectrl.h>
#include <wx/valtext.h>
#include <wx/valgen.h>
#include <wx/combobox.h>
#include "IPlugin.h"
#include "Base.h"
#include "Data.h"
#include "Dialogs.h"

class CPage2 : public wxWizardPageSimple
{
    public:
    CPage2(wxWizard* pParent, wxString* pName, wxString* pPhone);
    ~CPage2() { }

    private:
    enum
    {
        idBankNameCtrl = 310,
        idBankPhoneNumberCrtl,
    };

    wxString*   m_pName;
    wxString*   m_pPhone;
};

class CPage3 : public wxWizardPageSimple
{
    public:
    CPage3(wxWizard* pParent, wxString* pName, wxString* pNumber, wxString* pType, wxString* pDate, const wxArrayString AccountTypes, const bool IsNew);
    ~CPage3() { }

    virtual bool TransferDataFromWindow();

    private:
    enum
    {
        idAccountNameCtrl = 320,
        idAccountNumberCtrl,
        idAccountTypeCtrl,
        idDateOpenedCtrl,
    };

    wxString*   m_pName;
    wxString*   m_pType;
    wxString*   m_pNumber;
    wxString*   m_pDate;
};

class CPage4 : public wxWizardPageSimple
{
    public:
    CPage4(wxWizard* pParent, double* pBalance);
    ~CPage4() { }

    virtual bool TransferDataFromWindow();

    private:
    enum
    {
        idStartingBalanceCtrl = 330,
    };

    wxString    m_StartingBalance;
    double*     m_pBalance;
};

class CNewAccountWizard : public wxWizard
{
    public:
    CNewAccountWizard(wxWindow* pParent, IPluginHost* pHost, SAccountInfo* pAI, const bool IsNew);
    ~CNewAccountWizard() { }

    wxWizardPage* GetFirstPage() const { return m_pPage1; }

    private:
    void SetUpPage1();
    void SetUpPage5();

    wxWizardPageSimple*  m_pPage1;
    CPage2*              m_pPage2;
    CPage3*              m_pPage3;
    CPage4*              m_pPage4;
    wxWizardPageSimple*  m_pPage5;
    IPluginHost*         m_pHost;
    SAccountInfo*        m_pAI;
    wxString             m_DateOpened;
};

#endif // NEWACCOUNTWIZARD_H_INCLUDED
