#ifndef CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED
#define CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED

#include "calculate_parking_tickets_global.h"
#include "calculate_parking_tickets_tariff_step.h"
#include "calculate_parking_tickets_tariff.h"
#include "calculate_parking_tickets_utils.h"

#include <QTime>
#include <QVector>
#include <QPair>
#include <cinttypes>
#include <array>

struct DayInternal {
};

struct parking_tariff_t;
template <class T>
struct Day {
    static bool price(parking_tariff_t const * /*tariff*/,
                      QTime const & /*time*/,
                      uint32_t * /*price_units*/) {
        // minute_t const minute = time.hour()*60 + time.minute();
        // for (int i = 0; i < MIN_PER_DAY; ++i) {
            //if (m_tariffSteps[i].isValid()) {

            //}
        //}
        return true;
    }

protected:
    //std::array<TariffStep, MIN_PER_DAY> m_tariffSteps;

#if 0
    static bool price(parking_tariff_t const *tariff,
                      QTime const &time, uint32_t *price_units, int dayIndex) {
        minute_t const minute = time.hour()*60 + time.minute();
        for (int i = 0; i < tariff->m_tariffSteps[dayIndex].size(); ++i) {
            //if (minute >= tariff->m_tariff[dayIndex][i].first) {
            //    *price_units += tariff->m_tariff[dayIndex][i].second;
            //    return true;
            //}
        }
        return true;
        // return false;
    }
#endif
};

struct Holiday : Day<Holiday> {
    enum { dayIndex = 0 };
};

struct Monday : Day<Monday> {
    enum { dayIndex = Qt::Monday };
};

struct Tuesday : Day<Tuesday> {
    enum { dayIndex = Qt::Tuesday };
};

struct Wednesday : Day<Wednesday> {
    enum { dayIndex = Qt::Wednesday };
};

struct Thursday : Day<Thursday> {
    enum { dayIndex = Qt::Thursday };
};

struct Friday : Day<Friday> {
    enum { dayIndex = Qt::Friday };
};

struct Saturday : Day<Saturday> {
    enum { dayIndex = Qt::Saturday };
};

struct Sunday : Day<Sunday> {
    enum { dayIndex = Qt::Sunday };
};


#endif // CALCULATE_PARKING_TICKETS_DAY_H_INCLUDED
