// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs
// Based on "crates/re_types/definitions/rerun/blueprint/panel_view.fbs".

#pragma once

#include "../result.hpp"

#include <cstdint>
#include <memory>

namespace arrow {
    class Array;
    class DataType;
    class StructBuilder;
} // namespace arrow

namespace rerun::blueprint {
    /// **Blueprint**: The state of the panels.
    ///
    /// Unstable. Used for the ongoing blueprint experimentations.
    struct PanelView {
        bool is_expanded;

      public:
        PanelView() = default;

        PanelView(bool is_expanded_) : is_expanded(is_expanded_) {}

        PanelView& operator=(bool is_expanded_) {
            is_expanded = is_expanded_;
            return *this;
        }
    };
} // namespace rerun::blueprint

namespace rerun {
    template <typename T>
    struct Loggable;

    /// \private
    template <>
    struct Loggable<blueprint::PanelView> {
        static constexpr const char Name[] = "rerun.blueprint.PanelView";

        /// Returns the arrow data type this type corresponds to.
        static const std::shared_ptr<arrow::DataType>& arrow_datatype();

        /// Fills an arrow array builder with an array of this type.
        static rerun::Error fill_arrow_array_builder(
            arrow::StructBuilder* builder, const blueprint::PanelView* elements, size_t num_elements
        );

        /// Serializes an array of `rerun::blueprint::PanelView` into an arrow array.
        static Result<std::shared_ptr<arrow::Array>> to_arrow(
            const blueprint::PanelView* instances, size_t num_instances
        );
    };
} // namespace rerun
