"use strict";(self.webpackChunknextcloud_mail=self.webpackChunknextcloud_mail||[]).push([[276],{25737:function(t,n,e){var o=e(87537),a=e.n(o),c=e(23645),i=e.n(c)()(a());i.push([t.id,"\n.mail-empty-content {\n\tmargin: 0 auto;\n}\n","",{version:3,sources:["webpack://./src/views/Setup.vue"],names:[],mappings:";AAsEA;CACA,cAAA;AACA",sourcesContent:["<template>\n\t<Content app-name=\"mail\">\n\t\t<Navigation v-if=\"hasAccounts\" />\n\t\t<AppContent>\n\t\t\t<div class=\"mail-empty-content\">\n\t\t\t\t<EmptyContent v-if=\"allowNewMailAccounts\" :title=\"t('mail', 'Connect your mail account')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconMail :size=\"65\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #action>\n\t\t\t\t\t\t<AccountForm :display-name=\"displayName\"\n\t\t\t\t\t\t\t:email=\"email\"\n\t\t\t\t\t\t\t:error.sync=\"error\"\n\t\t\t\t\t\t\t@account-created=\"onAccountCreated\" />\n\t\t\t\t\t</template>\n\t\t\t\t</EmptyContent>\n\t\t\t\t<EmptyContent v-else :title=\"t('mail', 'To add a mail account, please contact your administrator.')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconMail :size=\"65\" />\n\t\t\t\t\t</template>\n\t\t\t\t</EmptyContent>\n\t\t\t</div>\n\t\t</AppContent>\n\t</Content>\n</template>\n\n<script>\nimport { NcContent as Content, NcAppContent as AppContent, NcEmptyContent as EmptyContent } from '@nextcloud/vue'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AccountForm from '../components/AccountForm'\nimport IconMail from 'vue-material-design-icons/Email'\nimport Navigation from '../components/Navigation'\nimport logger from '../logger'\n\nexport default {\n\tname: 'Setup',\n\tcomponents: {\n\t\tAppContent,\n\t\tAccountForm,\n\t\tContent,\n\t\tEmptyContent,\n\t\tIconMail,\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\tallowNewMailAccounts: loadState('mail', 'allow-new-accounts', true),\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\tonAccountCreated() {\n\t\t\tlogger.info('account successfully created, redirecting …')\n\t\t\tthis.$router.push({\n\t\t\t\tname: 'home',\n\t\t\t})\n\t\t},\n\t},\n}\n<\/script>\n\n<style>\n.mail-empty-content {\n\tmargin: 0 auto;\n}\n</style>\n"],sourceRoot:""}]),n.Z=i},13276:function(t,n,e){e.r(n),e.d(n,{default:function(){return M}});var o=e(15961),a=e(79954),c=e(63705),i=e(41447),l=e(46151),r=e(89177),s={name:"Setup",components:{AppContent:o.Mb,AccountForm:c.Z,Content:o.qF,EmptyContent:o.SL,IconMail:i.Z,Navigation:l.Z},data:function(){return{displayName:(0,a.j)("mail","prefill_displayName"),email:(0,a.j)("mail","prefill_email"),allowNewMailAccounts:(0,a.j)("mail","allow-new-accounts",!0),error:null}},computed:{hasAccounts:function(){return this.$store.getters.accounts.length>1}},methods:{onAccountCreated:function(){r.Z.info("account successfully created, redirecting …"),this.$router.push({name:"home"})}}},m=e(93379),u=e.n(m),p=e(7795),d=e.n(p),y=e(90569),A=e.n(y),C=e(3565),f=e.n(C),g=e(19216),h=e.n(g),v=e(44589),N=e.n(v),w=e(25737),E={};E.styleTagTransform=N(),E.setAttributes=f(),E.insert=A().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=h(),u()(w.Z,E),w.Z&&w.Z.locals&&w.Z.locals;var M=(0,e(51900).Z)(s,(function(){var t=this,n=t._self._c;return n("Content",{attrs:{"app-name":"mail"}},[t.hasAccounts?n("Navigation"):t._e(),t._v(" "),n("AppContent",[n("div",{staticClass:"mail-empty-content"},[t.allowNewMailAccounts?n("EmptyContent",{attrs:{title:t.t("mail","Connect your mail account")},scopedSlots:t._u([{key:"icon",fn:function(){return[n("IconMail",{attrs:{size:65}})]},proxy:!0},{key:"action",fn:function(){return[n("AccountForm",{attrs:{"display-name":t.displayName,email:t.email,error:t.error},on:{"update:error":function(n){t.error=n},"account-created":t.onAccountCreated}})]},proxy:!0}],null,!1,664637920)}):n("EmptyContent",{attrs:{title:t.t("mail","To add a mail account, please contact your administrator.")},scopedSlots:t._u([{key:"icon",fn:function(){return[n("IconMail",{attrs:{size:65}})]},proxy:!0}])})],1)])],1)}),[],!1,null,null,null).exports}}]);
//# sourceMappingURL=mail.276.e6df2ff30581b285ab09.js.map