'use strict';

var config = require('../../config/config');
var Promise = require('bluebird');

var ContentHelper = {
    getAllTypes: function() {
        return {
            '_builtin': {
                'displayName' : 'Built-in',
                'contentTypes' : {
                    'text': {
                        className: 'glyphicon-pencil',
                        displayName: 'Text',
                        description: 'Text based content',
                        summary: 'SEO Friendly text based markup',
                        model: require('../../models/shelves/particles/text')
                    },
                    'image': {
                        className: 'glyphicon-picture',
                        displayName: 'Image',
                        description: 'Pictorial content',
                        summary: 'Simple images, with heading, summary, etc.',
                        model: require('../../models/shelves/particles/image')
                    }
                }
            }
        }
    },
    getAllParentTypes: function() {
        // this needs to actually pool plugins, etc, to build this list.
        return [
            {
                type: '_builtin',
                name: 'page',
                model: require('../../models/shelves/page').Page
            },
            {
                type: '_builtin',
                name: 'site',
                model: require('../../models/shelves/site').Site
            }
        ]
    },
    getFilteredTypes: function(filter) {
        if (filter=='*') filter='*/*'
        if (!filter.contains('/')) return(null);
        filter = filter.split('/');
        console.log(filter);
        return ContentHelper.getTypes();
    }
};
/**
 * Get The Top Menu As A JS Object From Magento
 * @param req
 */
module.exports = ContentHelper;

@@ -249,16 +249,9 @@
    '
-contentT
+t
 ypes
@@ -1140,16 +1140,54 @@
 his list
+ - find things that can hold particles
 .%0A      
@@ -1199,9 +1199,9 @@
 urn 
-%5B
+%7B
 %0A   
@@ -1200,32 +1200,44 @@
 rn %7B%0A           
+ '_builtin':
  %7B%0A             
@@ -1235,37 +1235,47 @@
             
-type: '_b
+'displayName' : 'B
 uilt
+-
 in',%0A       
@@ -1287,21 +1287,49 @@
     
-name:
+'types' : %7B%0A                   
  'page'
-,
+: %7B
 %0A   
@@ -1345,56 +1345,46 @@
     
-model: require('../../models/shelves/page').Page
+        className: 'glyphicon-pencil',
 %0A   
@@ -1384,35 +1384,32 @@
 l',%0A            
-%7D,%0A
             %7B%0A  
@@ -1408,74 +1408,154 @@
     
-%7B%0A                type: '_builtin',%0A                name: 'site',%0A
+displayName: 'Page',%0A                        description: 'Basic Page',%0A                        summary: 'A %5C'generic%5C' page of content',%0A        
     
@@ -1607,19 +1607,54 @@
 ves/
-site').Site
+page')%0A                    %7D%0A                %7D
 %0A   
@@ -1676,9 +1676,9 @@
     
-%5D
+%7D
 %0A   

Refactor content helper to return same-shaped objects