<template>
    <v-row dense v-if="activeRecord">
        <v-col cols="12">
            <cs-edit-box 
                :control="controls.descriere"
                :errors="errorsManager.ByField('descriere')"
                v-model="activeRecord.descriere"
                @focus="errorsManager.ResetField('descriere')"
                @blur="errorsManager.Validate('descriere')"
            />
        </v-col>
        
        <v-col cols="12">
            <curs-tematica-control 
                v-model="activeRecord.tematica"
                @new-tematica="OnNewTematica"
            />
        </v-col> 
    </v-row>
</template>

<script>
    export default {
        props: {
            editable: {required: true},
        },

        computed: {
            form() {
                return this.editable.form;
            },

            app() {
                return this.editable.column.datatable.app;
            }
        },

        methods: {
            OnNewTematica(value) {
                console.log('new tematica');
            }
        },

        components: {
            CsEditBox: require('@CsVueComp/controls/texts/CsEditBox').default,
        },
       
        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'CursTematicaInput',
    }
</script>