#pragma once

#include <cstdint>

namespace pp::paint {

enum class BlendMode : std::uint8_t {
    normal,
    multiply,
    screen,
    color_dodge,
    overlay,
};

enum class StrokeBlendMode : std::uint8_t {
    normal,
    multiply,
    subtract,
    darken,
    overlay,
    color_dodge,
    color_burn,
    linear_burn,
    hard_mix,
    linear_height,
    height,
};

struct Rgba {
    float r = 0.0F;
    float g = 0.0F;
    float b = 0.0F;
    float a = 0.0F;
};

[[nodiscard]] Rgba blend_pixels(Rgba base, Rgba stroke, BlendMode mode) noexcept;
[[nodiscard]] float blend_stroke_alpha(
    float base,
    float stroke,
    float depth,
    StrokeBlendMode mode) noexcept;
[[nodiscard]] const char* blend_mode_name(BlendMode mode) noexcept;
[[nodiscard]] const char* stroke_blend_mode_name(StrokeBlendMode mode) noexcept;

}
