<template>
    <v-card
        tile
        flat
        :height="app.height"
        :width="app.width"
        class="overflow-hidden"
    > 
        <v-card-title class="pa-1">
            {{ __('Crearea unui client nou') }}

            <v-spacer></v-spacer>

            <cs-btn
                icon="mdi-arrow-left"
                :caption="app.width > 650 ? 'Lista de clienți' : null"
                tooltip="Înapoi la lista de clienți"
                text
                :click="Back"
            />
        </v-card-title>

        <v-card-text class="pa-1">
            <insert-customer-stepper-container 
                :app="app"
                :height="app.height - 40"
            />
        </v-card-text>
    </v-card>
</template>

<script>
    export default {
        props: {
            app: {required: true},
            customer: {default: null},
        },

        computed: {
            controller() {
                return this.app.classes.Controller;
            }
        },

        methods: {
            Back() {
                this.controller.currentComponent = 'customers-page';
                this.app.forms.Customers.Hide(true);
            }
        },

        components: {
            CsBtn: require('@CsVueComp/buttons/CsBtn').default,
        },

        name: 'CustomerInsertPage',
    }
</script>