#include <iostream>
#include <vector>
#include "histogram.h"
#include "svg.h"

using namespace std;

Input input_data();

int main() {
    auto input = input_data();
    auto bins = make_histogram(input.numbers, input.bin_count);
    show_histogram_svg(bins);

    return 0;
}

Input input_data() {
    Input in;
    size_t number_count = 0;

    cout << "Enter number count: ";
    cin >> number_count;

    cout << "Enter numbers: ";
    in.numbers.resize(number_count);
    for (size_t i = 0; i < number_count; i++) {
        cin >> in.numbers[i];
    }

    cout << "Enter bin count: ";
    cin >> in.bin_count;

    return in;
}
