"use strict";
var immutable_1 = require("immutable");
var index_1 = require("../index");
var shelf_1 = require("./shelf");
var Shop;
(function (Shop) {
    Shop.setName = index_1.action("SET_NAME", function (shop, name) { return index_1.amend(shop, { name: name }); });
    Shop.shelves = index_1.collection({
        type: "SHELVES",
        reducer: shelf_1.Shelf.reduce,
        operations: index_1.immutableMapOperations(),
        get: function (shop) { return shop.shelves; }
    });
    Shop.empty = {
        name: "",
        shelves: immutable_1.Map()
    };
    Shop.reduce = index_1.reducer(Shop.empty)
        .action(Shop.setName)
        .action(Shop.shelves);
})(Shop = exports.Shop || (exports.Shop = {}));
//# sourceMappingURL=shop.js.map