#pragma once

namespace flyff {
    enum class ObjectType : int {
        // Background object
        Object = 0,
        // Animation object
        Animation = 1,
        // Special background object
        Ctrl = 2,
        // Special effect object
        Sfx = 3,
        // Item
        Item = 4,
        // Moving object
        Mover = 5,
        // Region (event, attribute)
        Region = 6,
        Ship = 7,
        Path = 8,
    };

    static std::ostream &operator<<(std::ostream &os, const ObjectType &type) {
        switch (type) {
            case ObjectType::Object:
                os << "Object";
                break;
            case ObjectType::Animation:
                os << "Animation";
                break;
            case ObjectType::Ctrl:
                os << "Ctrl";
                break;
            case ObjectType::Sfx:
                os << "Sfx";
                break;
            case ObjectType::Item:
                os << "Item";
                break;
            case ObjectType::Mover:
                os << "Mover";
                break;
            case ObjectType::Region:
                os << "Region";
                break;
            case ObjectType::Ship:
                os << "Ship";
                break;
            case ObjectType::Path:
                os << "Path";
                break;
            default:
                os << "Unknown";
                break;
        }

        return os;
    }
};