"use strict";
var immutable_1 = require("immutable");
var index_1 = require("../index");
var book_1 = require("./book");
var Shelf;
(function (Shelf) {
    Shelf.setDescription = index_1.action("SET_DESCRIPTION", function (shelf, description) { return index_1.amend(shelf, { description: description }); });
    Shelf.books = index_1.collection("BOOKS", book_1.Book.reduce, index_1.immutableMapOperations(), function (shelf) { return shelf.books; });
    Shelf.empty = {
        description: "",
        books: immutable_1.Map()
    };
    Shelf.reduce = index_1.reducer(Shelf.empty)
        .action(Shelf.setDescription)
        .action(Shelf.books);
})(Shelf = exports.Shelf || (exports.Shelf = {}));
//# sourceMappingURL=shelf.js.map