<template>
  <edit-name-wizard
    :name="name"
    type="Snapshot"
    placeholder="Titel bearbeiten"
    @input="input"
    @cancel="hideModal"
    @save="save"
  />
</template>

<script>
import EditNameWizard from '@/components/profile/EditNameWizard.vue';

export default {
  components: {
    EditNameWizard,
  },

  data() {
    return {
      name: '',
    };
  },

  mounted() {
    this.name = this.$modal.state.payload.name;
  },

  methods: {
    save() {
      this.$modal.confirm(this.name);
    },
    hideModal() {
      this.$modal.cancel();
    },
    input(name) {
      this.name = name;
    },
  },
};
</script>

<style scoped lang="scss">
@import 'styles/helpers';
</style>
