"use strict";(self.webpackChunknextcloud_mail=self.webpackChunknextcloud_mail||[]).push([[393],{393:(t,n,e)=>{e.r(n),e.d(n,{default:()=>M});var o=e(63176),a=e(32981),c=e(14398),i=e(54573),r=e(87795),l=e(85745),s=e(51849),m=e(40459);const u={name:"Setup",components:{AppContent:o.ir,AccountForm:c.A,NcContent:o.bw,EmptyContent:o.yI,IconMail:i.A,Navigation:r.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:{...(0,s.n2)(m.A),hasAccounts(){return this.mainStore.getAccounts.length>1}},methods:{onAccountCreated(){l.A.info("account successfully created, redirecting …"),this.$router.push({name:"home"})}}};var p=e(85072),d=e.n(p),A=e(97825),C=e.n(A),y=e(77659),f=e.n(y),v=e(55056),N=e.n(v),h=e(10540),g=e.n(h),S=e(41113),w=e.n(S),x=e(61679),E={};E.styleTagTransform=w(),E.setAttributes=N(),E.insert=f().bind(null,"head"),E.domAPI=C(),E.insertStyleElement=g(),d()(x.A,E),x.A&&x.A.locals&&x.A.locals;const M=(0,e(14486).A)(u,(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},61679:(t,n,e)=>{e.d(n,{A:()=>r});var o=e(71354),a=e.n(o),c=e(76314),i=e.n(c)()(a());i.push([t.id,"\n.container{\n display: flex;\n justify-content: center;\n}\n","",{version:3,sources:["webpack://./src/views/Setup.vue"],names:[],mappings:";AA2EA;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'\nimport { mapStores } from 'pinia'\nimport useMainStore from '../store/mainStore.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\t...mapStores(useMainStore),\n\t\thasAccounts() {\n\t\t\treturn this.mainStore.getAccounts.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 r=i}}]);
//# sourceMappingURL=mail.393.0f051f8bba1847c54103.js.map