// Headers are available because we added the pls target
#include <string>
#include <cstdio>
#include <tuple>
#include <array>

#include <pls/dataflow/inputs.h>
#include <pls/dataflow/outputs.h>
#include <pls/dataflow/internal/graph.h>
#include <pls/dataflow/internal/out_port.h>
#include <pls/dataflow/internal/buffer.h>

int main() {
  using namespace pls::dataflow;
  using namespace pls::dataflow::internal;

  out_port<int> port1;
  out_port<int> port2;
  graph<static_buffer<4>::type, inputs<int, int>, outputs<int>> tmp{};

  port1 >> tmp.in_port<0>();
  port2 >> tmp.in_port<1>();

  port1.push_token({1, {}});
  port2.push_token({2, {}});

//  using namespace pls::dataflow;
//
//  graph<inputs<int, int>, outputs<int, int>, 2> graph2;
//  graph2.input<0>() >> graph2.output<1>();
//  graph2.input<1>() >> graph2.output<0>();
//
//  graph<inputs<int, int>, outputs<int, int>, 2> graph1;
//  graph1.input<0>() >> graph2.external_input<0>();
//  graph1.input<1>() >> graph2.external_input<1>();
//  graph2.external_output<0>() >> graph1.output<0>();
//  graph2.external_output<1>() >> graph1.output<1>();
//
//  graph1.push_input(1, 2);
//  graph1.push_input(3, 4);
//
//  auto result1 = graph1.get_output();
//  std::cout << std::get<0>(result1) << ", " << std::get<1>(result1) << std::endl;
//
//  graph1.push_input(5, 6);
//
//  auto result2 = graph1.get_output();
//  std::cout << std::get<0>(result2) << ", " << std::get<1>(result2) << std::endl;
//
//  auto result3 = graph1.get_output();
//  std::cout << std::get<0>(result3) << ", " << std::get<1>(result3) << std::endl;

}
