<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 WidgetPage from '@/widgets/base/components/widget-page/WidgetPage.vue'
import NewMessageForm from '@/widgets/messages/components/message-form/NewMessageForm.vue'
import { hashNavRoutes } from '@/widgets/messages/router/hashRoutes'

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