#pragma once

#include <memory>

// TetrisApp is the top-level application orchestrator.
//
// Responsibilities:
// - SDL/TTF init + shutdown
// - Asset/music loading + loading screen
// - Main loop + state transitions
//
// It uses a PIMPL to keep `TetrisApp.h` light (faster builds) and to avoid leaking
// SDL-heavy includes into every translation unit.
class TetrisApp {
public:
    TetrisApp();
    ~TetrisApp();

    TetrisApp(const TetrisApp&) = delete;
    TetrisApp& operator=(const TetrisApp&) = delete;

    // Runs the application until exit is requested.
    // Returns a non-zero exit code on initialization failure.
    int run();

private:
    struct Impl;
    std::unique_ptr<Impl> impl_;
};
