from stock import Shelf, reserve, restock, total


# a function that changes an argument and returns a value, called by keyword too
def main() -> None:
    items = Shelf([10, 20, 30])
    restock(items, position=0, amount=6)
    accepted: bool = reserve(items, position=1, amount=5)
    print(accepted, total(items))
    declined: bool = reserve(items, amount=99, position=2)
    print(declined, total(items))
    again: bool = False
    again = reserve(items, 0, amount=1)
    print(again, total(items))


if __name__ == "__main__":
    main()
