<template>
    <v-row dense>
        <v-col
            cols="12" 
        >
            <category-selector 
                v-if="!! activeRecord"
                :app="app"
                :categories="categories"
                type="cursuri"
                :selectorErrors="errorsManager.ByField('category_id')"
                v-model="activeRecord.category_id"
                @focus="errorsManager.ResetField('category_id')"
                @blur="errorsManager.Validate('category_id')"
            />
            
        </v-col>
    </v-row>
</template>

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

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

            app() {
                return this.form.app;
            },

            categories() {
                return this.app.dataSession.Categories.selectorOptions;
            },
        },

        components: {
            CategorySelector: require('@MyDpoComp/Entities/Categories/Controls/Selector/CategorySelector').default,
        },
        
        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'DtCursNameEdit',
    }
</script>