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

#include "persistence.hpp"
#include "logger.hpp"

static const char* TAG = "Persistence";

Persistence::Persistence()
    : m_isInitialized(false)
{
}

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

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

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

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

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