#pragma once

#include <array>
#include <optional>
#include <vector>

#include <fesa/core/diagnostic.hpp>
#include <fesa/core/vec3.hpp>

namespace fesa {

using Matrix12 = std::array<std::array<double, 12>, 12>;

struct BeamFrame final {
    Vec3 ex;
    Vec3 ey;
    Vec3 ez;
};

struct BeamFrameResult final {
    std::optional<BeamFrame> frame;
    std::vector<Diagnostic> diagnostics;
};

[[nodiscard]] BeamFrameResult make_beam_frame(
    const Vec3& first,
    const Vec3& second,
    const Vec3& orientation);

[[nodiscard]] Matrix12 beam_transformation(const BeamFrame& frame);

}  // namespace fesa
