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

#include "fw_upgrader.hpp"
#include "logger.hpp"

static const char* TAG = "FwUpgrader";

FwUpgrader::FwUpgrader()
    : m_isInitialized(false)
{
}

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

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

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

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

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