/**
 * @file error_handler.cpp
 * @brief ErrorHandler component implementation
 * @author Mahmoud Elmohtady
 * @company Nabd solutions - ASF
 * @copyright Copyright (c) 2025
 */

#include "error_handler.hpp"
#include "logger.hpp"

static const char* TAG = "ErrorHandler";

ErrorHandler::ErrorHandler()
    : m_isInitialized(false)
{
}

ErrorHandler::~ErrorHandler()
{
    deinitialize();
}

bool ErrorHandler::initialize()
{
    // TODO: Implement initialization
    m_isInitialized = true;
    ASF_LOGI(TAG, 4800, asf::logger::Criticality::LOW, "ErrorHandler initialized successfully");
    return true;
}

bool ErrorHandler::deinitialize()
{
    if (!m_isInitialized)
    {
        return false;
    }

    // TODO: Implement deinitialization
    m_isInitialized = false;
    return true;
}

bool ErrorHandler::isInitialized() const
{
    return m_isInitialized;
}
