<template>
    <v-row dense v-if="activeRecord">
        <v-col cols="12">
            <adresare-autocomplete-selector
                :app="app"
                :errors="errorsManager.ByField('adresare_id')"
                :adresareForm="app.forms.Adresare"
                @focus="errorsManager.ResetField('adresare_id')"
                v-model="activeRecord.adresare_id"
            />
        </v-col>
        
        <v-col cols="12">
            <categorie-autocomplete-selector
                :app="app"
                :categoriiForm="app.forms.Categorii"
                :errors="errorsManager.ByField('category_id')"
                @focus="errorsManager.ResetField('category_id')"
                categoriiType="cursuri"
                v-model="activeRecord.category_id"
            />
        </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;
            }
        },
       
        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'CursAdresareInput',
    }
</script>