#pragma once

class TimeObserver;

#include <memory>
#include <string>
#include <set>
#include <utility>

class Time {
public:
    enum class State {
        Closing,
        FocusChanged
    };

    void attach(TimeObserver* observer);
    void detach(TimeObserver* observer);
    Time& operator++();
    size_t day() const { return _day; }

private:
    void notify() const;

    size_t _day{0};
    std::set<TimeObserver*> _observers;
};
