<template>
    <v-sheet tile>

        <template v-if="action != 'delete'">
            <v-row dense>
                <v-col cols="12">
                    <cs-text-box 
                        ref="First"
                        :control="controls.name"
                        :errors="errorsManager.ByField('name')"
                        v-model="activeRecord.name"
                        @focus="errorsManager.ResetField('name')"
                        @blur="errorsManager.Validate('name')"
                    />
                </v-col>

            </v-row>
        </template>

        
    </v-sheet>
</template>

<script>
    export default {

        props: {
            controls: {default: () => ({})},
            activeRecord: {required: true},
            errorsManager: {required: true},
            action: {required: true},
            currentAction: {required: true},
        },

        methods: {
            Focus() {
                
                this.$refs.First.Focus();
            }
        },

        mounted() {
            if(this.action != 'delete')
            {
            }    
        },

        components: {
            CsTextBox: require('@CsVueComp/controls/texts/CsTextBox').default, 
            CsInfoAlert: require('@CsVueComp/sheets/CsInfoAlert').default,
        },

        name: 'CategorieInput',
    }
</script>