/**
 * Created by rburson on 12/23/15.
 */

import * as React from 'react'
import {CvBaseMixin, CvContext, CvQueryBase, CvQueryPaneCallback, CvQueryPaneProps, CvQueryPaneState} from './catreact-core'
import {ListContext} from 'catavolt-sdk'

export interface CvListPaneState extends CvQueryPaneState {
}

export interface CvListPaneProps extends CvQueryPaneProps {
}

/*
 ***************************************************
 * Render a ListContext
 ***************************************************
 */
export var CvListPane = React.createClass<CvListPaneProps, CvListPaneState>({

    mixins: [CvBaseMixin, CvQueryBase],

    componentWillMount: function () {
        this._componentWillMount();
    },

    componentWillReceiveProps: function(nextProps, nextContext) {
        this._componentWillReceiveProps(nextProps, nextContext);
    },
    
    componentWillUnmount: function() {
        this._componentWillUnmount();
    },

    getDefaultProps: function() {
        return CvQueryBase._getDefaultProps();
    },

    listContext: function() {
        return this.queryContext() as ListContext;
    },
    
    render: function () {
        return this._render();
    },

});
