// mode_enable — pure implementation. See mode_enable.h.

#include "core/ui/mode_enable.h"

#include "core/view/view_mode_model.h"  // kArrangeModeId / kDesignModeId

namespace reasampler::ui {

bool tagButtonEnabled(const std::string& activeModeId, TagTarget target) {
    const char* targetId =
        (target == TagTarget::Arrange) ? kArrangeModeId : kDesignModeId;

    // Fail-open on an unrecognized active id: every button live.
    if (activeModeId != kArrangeModeId && activeModeId != kDesignModeId) return true;

    return activeModeId != targetId;
}

} // namespace reasampler::ui
