"use strict";(self.webpackChunknextcloud_mail=self.webpackChunknextcloud_mail||[]).push([[660],{14027:(t,n,e)=>{e.d(n,{A:()=>i});var o=e(71354),a=e.n(o),c=e(76314),l=e.n(c)()(a());l.push([t.id,"\n.container{\n display: flex;\n justify-content: center;\n}\n","",{version:3,sources:["webpack://./src/views/Setup.vue"],names:[],mappings:";AAwEA;CACA,aAAA;CACA,uBAAA;AACA",sourcesContent:["\x3c!--\n  - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n  - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n<template>\n\t<NcContent app-name=\"mail\">\n\t\t<Navigation v-if=\"hasAccounts\" />\n\t\t<AppContent class=\"container\">\n\t\t\t<div v-if=\"allowNewMailAccounts\">\n\t\t\t\t<EmptyContent :name=\"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</EmptyContent>\n\t\t\t\t<AccountForm :display-name=\"displayName\"\n\t\t\t\t\t:email=\"email\"\n\t\t\t\t\t:error.sync=\"error\"\n\t\t\t\t\t@account-created=\"onAccountCreated\" />\n\t\t\t</div>\n\t\t\t<EmptyContent v-else :name=\"t('mail', 'To add a mail account, please contact your administrator.')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconMail :size=\"65\" />\n\t\t\t\t</template>\n\t\t\t</EmptyContent>\n\t\t</AppContent>\n\t</NcContent>\n</template>\n\n<script>\nimport { NcContent, NcAppContent as AppContent, NcEmptyContent as EmptyContent } from '@nextcloud/vue'\nimport { loadState } from '@nextcloud/initial-state'\n\nimport AccountForm from '../components/AccountForm.vue'\nimport IconMail from 'vue-material-design-icons/Email.vue'\nimport Navigation from '../components/Navigation.vue'\nimport logger from '../logger.js'\n\nexport default {\n\tname: 'Setup',\n\tcomponents: {\n\t\tAppContent,\n\t\tAccountForm,\n\t\tNcContent,\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.container{\n display: flex;\n justify-content: center;\n}\n</style>\n"],sourceRoot:""}]);const i=l},88660:(t,n,e)=>{e.r(n),e.d(n,{default:()=>E});var o=e(83240),a=e(32981),c=e(31031),l=e(54573),i=e(51317),r=e(85745);const s={name:"Setup",components:{AppContent:o.ir,AccountForm:c.A,NcContent:o.bw,EmptyContent:o.yI,IconMail:l.A,Navigation:i.A},data:()=>({displayName:(0,a.C)("mail","prefill_displayName"),email:(0,a.C)("mail","prefill_email"),allowNewMailAccounts:(0,a.C)("mail","allow-new-accounts",!0),error:null}),computed:{hasAccounts(){return this.$store.getters.accounts.length>1}},methods:{onAccountCreated(){r.A.info("account successfully created, redirecting …"),this.$router.push({name:"home"})}}};var m=e(85072),u=e.n(m),p=e(97825),d=e.n(p),A=e(77659),C=e.n(A),y=e(55056),f=e.n(y),v=e(10540),N=e.n(v),h=e(41113),g=e.n(h),w=e(14027),x={};x.styleTagTransform=g(),x.setAttributes=f(),x.insert=C().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=N(),u()(w.A,x),w.A&&w.A.locals&&w.A.locals;const E=(0,e(14486).A)(s,(function(){var t=this,n=t._self._c;return n("NcContent",{attrs:{"app-name":"mail"}},[t.hasAccounts?n("Navigation"):t._e(),t._v(" "),n("AppContent",{staticClass:"container"},[t.allowNewMailAccounts?n("div",[n("EmptyContent",{attrs:{name:t.t("mail","Connect your mail account")},scopedSlots:t._u([{key:"icon",fn:function(){return[n("IconMail",{attrs:{size:65}})]},proxy:!0}],null,!1,2751298635)}),t._v(" "),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}})],1):n("EmptyContent",{attrs:{name: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.660.96e47f807cf90886ffde.js.map