(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{1344:function(t,n,e){"use strict";var o=e(41),r=e.n(o),a=e(42),c=e.n(a)()(r.a);c.push([t.i,"\n#emptycontent {\n\tmargin-top: 10vh;\n}\n","",{version:3,sources:["webpack://./src/views/Setup.vue"],names:[],mappings:";AAwEA;CACA,gBAAA;AACA",sourcesContent:["<template>\n\t<Content app-name=\"mail\">\n\t\t<Navigation v-if=\"hasAccounts\" />\n\t\t<div id=\"emptycontent\">\n\t\t\t<div class=\"icon-mail\" />\n\t\t\t<h2>{{ t('mail', 'Connect your mail account') }}</h2>\n\t\t\t<AccountForm :display-name=\"displayName\" :email=\"email\" :save=\"onSave\">\n\t\t\t\t<template v-if=\"error\" #feedback class=\"warning\">\n\t\t\t\t\t{{ error }}\n\t\t\t\t</template>\n\t\t\t</AccountForm>\n\t\t</div>\n\t</Content>\n</template>\n\n<script>\nimport Content from '@nextcloud/vue/dist/Components/Content'\nimport { loadState } from '@nextcloud/initial-state'\nimport { translate as t } from '@nextcloud/l10n'\n\nimport AccountForm from '../components/AccountForm'\nimport Navigation from '../components/Navigation'\nimport logger from '../logger'\n\nexport default {\n\tname: 'Setup',\n\tcomponents: {\n\t\tAccountForm,\n\t\tContent,\n\t\tNavigation,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tdisplayName: loadState('mail', 'prefill_displayName'),\n\t\t\temail: loadState('mail', 'prefill_email'),\n\t\t\terror: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\thasAccounts() {\n\t\t\treturn this.$store.getters.accounts.length > 1\n\t\t},\n\t},\n\tmethods: {\n\t\tonSave(data) {\n\t\t\tthis.error = null\n\n\t\t\treturn this.$store\n\t\t\t\t.dispatch('createAccount', data)\n\t\t\t\t.then((account) => {\n\t\t\t\t\tlogger.info('account successfully created, redirecting …')\n\t\t\t\t\tthis.$router.push({\n\t\t\t\t\t\tname: 'home',\n\t\t\t\t\t})\n\n\t\t\t\t\treturn account\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tlogger.error('Could not create account', { error })\n\n\t\t\t\t\tif (error.message) {\n\t\t\t\t\t\tthis.error = error.message\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.error = t('mail', 'Unexpected error during account creation')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\t},\n}\n<\/script>\n\n<style>\n#emptycontent {\n\tmargin-top: 10vh;\n}\n</style>\n"],sourceRoot:""}]),n.a=c},1365:function(t,n,e){"use strict";e.r(n);var o=e(772),r=e.n(o),a=e(208),c=e(38),i=e(1050),s=e(1046),l=e(12),u={name:"Setup",components:{AccountForm:i.a,Content:r.a,Navigation:s.a},data:function(){return{displayName:Object(a.loadState)("mail","prefill_displayName"),email:Object(a.loadState)("mail","prefill_email"),error:null}},computed:{hasAccounts:function(){return this.$store.getters.accounts.length>1}},methods:{onSave:function(t){var n=this;return this.error=null,this.$store.dispatch("createAccount",t).then((function(t){return l.a.info("account successfully created, redirecting …"),n.$router.push({name:"home"}),t})).catch((function(t){l.a.error("Could not create account",{error:t}),t.message?n.error=t.message:n.error=Object(c.translate)("mail","Unexpected error during account creation")}))}}},m=e(40),p=e.n(m),d=e(1344),h={insert:"head",singleton:!1},v=(p()(d.a,h),d.a.locals,e(29)),f=Object(v.a)(u,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("Content",{attrs:{"app-name":"mail"}},[t.hasAccounts?e("Navigation"):t._e(),t._v(" "),e("div",{attrs:{id:"emptycontent"}},[e("div",{staticClass:"icon-mail"}),t._v(" "),e("h2",[t._v(t._s(t.t("mail","Connect your mail account")))]),t._v(" "),e("AccountForm",{attrs:{"display-name":t.displayName,email:t.email,save:t.onSave},scopedSlots:t._u([t.error?{key:"feedback",fn:function(){return[t._v("\n\t\t\t\t"+t._s(t.error)+"\n\t\t\t")]},proxy:!0}:null],null,!0)})],1)],1)}),[],!1,null,null,null);n.default=f.exports}},0,[8]]);
//# sourceMappingURL=mail.10.fa402ff690d49300589a.js.map