#include <stdio.h>
#include <stdlib.h>
#include "pico/stdlib.h"
#include "vector.h"

int main() {
    // Initialize
    stdio_init_all();
  
    Vector vector;
    VectorInit(&vector);

    printf("Initial - count: %d, limit: %d\n", vector.count, vector.limit);

    // Add Days of the week
    vector.push(&vector, "Sunday");
    vector.push(&vector, "Monday");
    vector.push(&vector, "Saturday");
    vector.push(&vector, "Wednesday");
    vector.push(&vector, "Thursday");
    vector.push(&vector, "Friday");
    vector.push(&vector, "Tuesday");

    printf("After Add - count: %d, limit: %d\n", vector.count, vector.limit);

    vector.remove(&vector, 2);

    printf("After Remove - count: %d, limit: %d\n", vector.count, vector.limit);

    vector.push(&vector, "Saturday");

    printf("After Add - count: %d, limit: %d\n", vector.count, vector.limit);

    printf("\nDays of the Week:\n");

    for (int i = 0; i < vector.count; i++) {
        printf("%s\n", (char *)vector.data[i]);
    }

    vector.free(&vector);

    while (true) {
        sleep_ms(250);
    }

    return 0;
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT