#pragma once
#include "device_preferences.h"
#include <cstdint>

namespace wearable {
// Semantic roles keep page code independent from concrete embedded fonts.
// Every role is rendered at its native resource size (text scale 1.0).
enum class TypeRole : uint8_t {
    WatchTime,
    WatchDate,
    PageTitle,
    StatusPrimary,
    StatusSecondary,
    AgentBody,
    AgentBodyLarge,
    Meta,
    Footer,
};

inline uint8_t nominal_pixels(TypeRole role,TextSize body=TextSize::Normal) {
    switch(role) {
    case TypeRole::WatchTime:return 88;
    case TypeRole::WatchDate:return 28;
    case TypeRole::PageTitle:return 24;
    case TypeRole::StatusPrimary:return 24;
    case TypeRole::StatusSecondary:return 18;
    case TypeRole::AgentBody:
        return body==TextSize::Compact?16:body==TextSize::Normal?24:28;
    case TypeRole::AgentBodyLarge:
        return body==TextSize::Compact?18:body==TextSize::Normal?24:28;
    case TypeRole::Meta:return 16;
    case TypeRole::Footer:return 14;
    }
    return 16;
}
} // namespace wearable
