/**
 * 资源库组件L 组件、页面、区块
 * @author xiufu.wang
 */
import ProOnlineRender from 'mars-pro/packages/pro-online-render'
import ElForm from 'mars-pro/packages/form'
import ResourceBlocks from './resource-blocks'
import ResourceComponents from './resource-components'
import ResourcePages from './resource-pages'
import ResourceDyncs from './resource-dyncs'
export default {
    name: 'ProOnlineDesignResource',
    componentName: 'ProOnlineDesignResource',
    inject: ['proOnlineDesign'],
    components: {
        ProOnlineRender,
        ResourceBlocks,
        ResourceComponents,
        ResourcePages,
        ResourceDyncs
    },
    computed: {
        showType() { 
            return this.proOnlineDesign.xstate.showType
        }  
    },
    render() {
        //'components', 'blocks', 'pages', 'dyncs'
        return <div class="resource-list">
            {
             this.showType === 'components' && <ResourceComponents/>  
            }
            {
             this.showType === 'blocks' && <ResourceBlocks/>  
            }
            {
             this.showType === 'pages' && <ResourcePages/>  
            }
            {
             this.showType === 'dyncs' && <ResourceDyncs/>  
            }
        </div>
    }
}