<template>
    <v-menu
        v-model="form.menu.visible"
        :position-x="form.menu.x"
        :position-y="form.menu.y"
        absolute
        offset-y
        right
        :close-on-content-click="false"
        :close-on-click="false"
    >
        <cs-form-card 
            :form="form"
            :messageBox="null"
            
        > 
            <service-input 
                :controls="controls"
                :activeRecord="activeRecord"
                :errorsManager="errorsManager"
                :action="action"
                :currentAction="currentAction"
                :types="types"
                @new-abonament="OnNewAbonament"
            />
        </cs-form-card>
    </v-menu>
</template>

<script>
    export default {

        props: {
            app: {required: true},
            types: {default: () => []},
        },

        computed: {
            form() {
                return this.app.forms.Services;
            },
        },

        methods: {
            OnNewAbonament(e) {
                this.app.classes.Controller.newAbonamentName = e;
            }
        },

        components: {
            CsFormCard: require('@CsVueComp/cards/CsFormCard').default,
        },

        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],
        
        name: 'ServiceFormMenu',
    }
</script>