/***********************************************************************************

    Copyright (C) 2007-2026 Ahmet Öztürk (aoz_2@yahoo.com)

    This file is part of Lifeograph.

    Lifeograph 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.

    Lifeograph 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 Lifeograph.5 If not, see <http://www.gnu.org/licenses/>.

***********************************************************************************/


#ifndef LIFEOGRAPH_DIALOG_IMPORT_HEADER
#define LIFEOGRAPH_DIALOG_IMPORT_HEADER


#include <gtkmm.h>

#include "../helpers_gtk.hpp"


namespace LoG
{

using namespace HELPERS;

// IMPORT DIALOG ===================================================================================
class DialogImport : public Gtk::Window
{
    public:
                                    DialogImport( BaseObjectType*,
                                                  const Glib::RefPtr< Gtk::Builder >& );

    protected:
        void                        handle_import_path_changed( const String& uri )
        {
            s_import_uri = uri;
            handle_readiness_changed();
        }
        void                        handle_importer_changed( String );
        void                        handle_readiness_changed();

        void                        update_importers();
        void                        handle_go();

        FileChooserButton*          m_FCB_import;
        DropDownAdvanced< String >* m_DD_type;
        // Gtk::Button*                m_B_edit;
        Gtk::Button*                m_B_import;
        Gtk::Box*                   m_Bx_contents;
        // Gtk::Widget*                m_p2W_options;

        static String               s_active_importer;
        static String               s_import_uri;
        // ^ this is String instead of StringV to be used in PyBinding functions directly
        // TODO: 3.2+: when non-python importers or importer options are a thing use the below:
        // VecImporters                m_importers;
        // Importer*                   m_p2importer_cur;

        // bool                        m_F_importer_ready;
};

} // end of namespace LoG

#endif
