//
// Created by sebastian on 12.02.26.
//

#ifndef DICEWARS_SIEDLER_LAYOUTSTYLE_H
#define DICEWARS_SIEDLER_LAYOUTSTYLE_H

enum class SizeUnit {
    Pixels,
    Percent
};

struct SizeValue {
    float value;
    SizeUnit unit;
};

struct Margin {
    SizeValue left;
    SizeValue top;
};

enum class FlexDirection {
    Row,
    Column
};

enum class JustifyContent {
    Start,
    Center,
    End,
    SpaceBetween,
};

enum class AlignItems {
    Start,
    Center,
    End,
    Stretch
};

struct LayoutStyle {
    SizeValue width = {1.0f, SizeUnit::Percent};
    SizeValue height = {1.0f, SizeUnit::Percent};

    Margin margin = {
        .left = {0.0f, SizeUnit::Percent},
        .top = {0.0f, SizeUnit::Percent},
    };

    FlexDirection flexDirection = FlexDirection::Column;
    JustifyContent justifyContent = JustifyContent::Start;
    AlignItems alignItems = AlignItems::Start;

    float flexGrow = 0.0f;
};

#endif //DICEWARS_SIEDLER_LAYOUTSTYLE_H