"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const assert_1 = __importDefault(require("assert"));
const debug_1 = require("../../../debug");
const fromSpec_1 = require("../../../spec/fromSpec");
const _specs_1 = __importDefault(require("../../../system/_specs"));
const system_1 = require("../../util/system");
// import Lever from '../../../unit/system/core/common/Lever/Class'
const spec = require('../../../system/core/common/Lever/spec.json');
const Lever = (0, fromSpec_1.fromSpec)(spec, _specs_1.default, {});
const lever = new Lever(system_1.system);
false && (0, debug_1.watchUnitAndLog)(lever);
false && (0, debug_1.watchGraphAndLog)(lever);
lever.play();
lever.push('a', 1);
lever.push('c', true);
assert_1.default.equal(lever.take('a'), 1);
assert_1.default.equal(lever.take('a'), undefined);
assert_1.default.equal(lever.peakInput('a'), undefined);
assert_1.default.equal(lever.peakInput('c'), undefined);
lever.push('a', 1);
lever.push('b', 2);
lever.push('c', false);
assert_1.default.equal(lever.take('a'), 2);
assert_1.default.equal(lever.peakInput('a'), 1);
lever.setInputConstant('c', true);
lever.push('c', false);
lever.push('a', 3);
lever.push('b', 4);
assert_1.default.equal(lever.take('a'), 4);
lever.push('b', 5);
assert_1.default.equal(lever.take('a'), 5);
assert_1.default.equal(lever.peakInput('a'), 3);
assert_1.default.equal(lever.peakInput('b'), undefined);
assert_1.default.equal(lever.peakInput('c'), false);
//# sourceMappingURL=Lever.js.map