<template>
  <widget-page disable>
    <new-message-form @save="toIndexPage" @cancel="toIndexPage" />
  </widget-page>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { RouteNames } from '@/widgets/messages/router/routeNames'
import WidgetPage from '@/widgets/base/components/widget-page/WidgetPage.vue'
import NewMessageForm from '@/widgets/messages/components/message-form/NewMessageForm.vue'

@Component({
  components: { NewMessageForm, WidgetPage },
})
export default class CreateThreadPage extends Vue {
  toIndexPage() {
    return this.$router.push({ name: RouteNames.index })
  }
}
</script>
