import { createReducer } from 'redux-immutablejs';
import { Record } from 'immutable';

let bayId = 0;

const PatchBayRecord = Record({
  id: null,
  jackCount: 24,
});

function buildPatchBay(jackCount) {
  bayId += 1;

  return PatchBayRecord({
    id: bayId,
    jackCount,
  });
}

const initialState = {
  patchBays: [buildPatchBay(24), buildPatchBay(12)],
};

export default createReducer(
  initialState,
  {
  },
);

@@ -52,16 +52,22 @@
 import %7B
+ List,
  Record 
@@ -164,16 +164,53 @@
 nt: 24,%0A
+  outputs: List(),%0A  inputs: List(),%0A
 %7D);%0A%0Afun

add i/o