"use strict";(self.webpackChunknextcloud_mail=self.webpackChunknextcloud_mail||[]).push([[731],{17157:(t,n,e)=>{e.d(n,{Z:()=>i});var o=e(87537),a=e.n(o),l=e(23645),c=e.n(l)()(a());c.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.vue'\nimport IconMail from 'vue-material-design-icons/Email'\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\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:""}]);const i=c},86731:(t,n,e)=>{e.r(n),e.d(n,{default:()=>M});var o=e(15961),a=e(43554),l=e(5172),c=e(730),i=e(34854),r=e(89177);const s={name:"Setup",components:{AppContent:o.Mb,AccountForm:l.Z,Content:o.qF,EmptyContent:o.SL,IconMail:c.Z,Navigation:i.Z},data:()=>({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(){return this.$store.getters.accounts.length>1}},methods:{onAccountCreated(){r.Z.info("account successfully created, redirecting …"),this.$router.push({name:"home"})}}};var 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),v=e(19216),g=e.n(v),h=e(44589),N=e.n(h),w=e(17157),E={};E.styleTagTransform=N(),E.setAttributes=f(),E.insert=A().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=g(),u()(w.Z,E),w.Z&&w.Z.locals&&w.Z.locals;const 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.731.96d2e52ac71be162bdd2.js.map