import ItemChooser from './ItemChooser.js';
import ItemImageController from './ItemImageController.js';
import _Item from './_Item.js';

function ItemImageUploader(){
var item = null;
return {
view: function(){
  return m('.item-image-uploader', [
    m('h2', 'Upload Images to Items'),
    m('.container', [
      m('.columns', [
        m('.column.col-6', [
          m(ItemChooser, {onchoose: function(_item){
                  item = _item;
                  _Item.loadImages(item);
                  }})
          ]),
        m('.column.col-6', [
          m(ItemImageController, {item: item})
          ])
        ])
      ])
    ]);
}
};
}

export default ItemImageUploader;