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

import * as React from 'react'
import {
    CvEditorBaseProps,
    CvEditorBaseState,
    CvEditorPaneCallback,
    CvBaseMixin,
    CvEditorBase
} from './catreact-core'
import {
    DetailsContext,
    Log
} from 'catavolt-sdk'

export interface CvDetailsPaneState extends CvEditorBaseState {} 
export interface CvDetailsPaneProps extends CvEditorBaseProps {}
export interface CvDetailsPaneCallback extends CvEditorPaneCallback{}

/**
 * Render a DetailsContext
 */
export var CvDetailsPane = React.createClass<CvDetailsPaneProps, CvDetailsPaneState>({

    mixins: [CvBaseMixin, CvEditorBase],

    componentDidMount: function () {
        this._componentDidMount();
    },

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

    componentWillUnmount: function () {
        this._componentWillUnmount();
    },

    detailsContext: function (nextProps, nextContext) {
        return this.editorContext(nextProps, nextContext) as DetailsContext;
    },

    getDefaultProps: function () {
        return CvEditorBase._getDefaultProps();
    },
    
    render: function() {
        return this._render();
    }

});
