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

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

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();
    },
  },
};
</script>

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