import r from"./TextDivider.54add59f.js";import i from"./FormInput.7debc7c5.js";import o from"./Button.f17dffc9.js";import a from"./Container.f87d9f62.js";import{n}from"./plugin-vue2_normalizer.000ba15c.js";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./ErrorText.b141a597.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";const l={metaInfo:{title:"Login"},components:{TextDivider:r,FormInput:i,Button:o,Container:a},props:{errors:Object},data(){return{sending:!1,form:{email:null,password:null,remember:null}}},mounted(){window.location.search.includes("demo=")&&(this.form.email="demo@ploi-core.io",this.form.password="secret")},methods:{submit(){this.$inertia.post(this.route("login"),{email:this.form.email,password:this.form.password,remember:this.form.remember},{onStart:()=>this.sending=!0,onFinish:()=>this.sending=!1})}}};var m=function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex items-center justify-center w-full min-h-screen"},[t("Container",{attrs:{size:"small"}},[t("form",{staticClass:"space-y-4",on:{submit:function(s){return s.preventDefault(),e.submit.apply(null,arguments)}}},[t("div",{staticClass:"flex flex-col items-center space-y-5"},[e.$page.props.settings.logo?t("img",{staticClass:"h-14",attrs:{src:e.$page.props.settings.logo}}):e._e(),t("h1",{staticClass:"font-semibold text-center text-title"},[e._v(" Login to "+e._s(e.$page.props.settings.name)+" ")])]),t("FormInput",{attrs:{label:e.__("Email"),autofocus:!0,errors:e.$page.props.errors.email,id:"email",type:"email",required:""},model:{value:e.form.email,callback:function(s){e.$set(e.form,"email",s)},expression:"form.email"}}),t("FormInput",{attrs:{label:e.__("Password"),id:"password",type:"password",required:""},model:{value:e.form.password,callback:function(s){e.$set(e.form,"password",s)},expression:"form.password"}}),t("Button",{attrs:{variant:"primary",disabled:e.sending,block:""}},[e._v(e._s(e.__("Login")))]),t("Button",{attrs:{as:"inertia-link",disabled:e.sending,href:e.route("password.request"),variant:"secondary",block:""}},[e._v(e._s(e.__("Reset password"))+" ")]),e.$page.props.settings.allow_registration?t("TextDivider",[e._v(e._s(e.__("Or")))]):e._e(),t("div",{staticClass:"space-y-3"},[e.$page.props.settings.allow_registration?t("Button",{attrs:{as:"inertia-link",href:e.route("register"),variant:"secondary",disabled:e.sending,block:""}},[e._v("Register ")]):e._e()],1),e.$page.props.settings.has_terms?t("TextDivider",{attrs:{"without-text":!0}}):e._e(),e.$page.props.settings.has_terms||e.$page.props.settings.has_privacy?t("div",{staticClass:"flex justify-between"},[e.$page.props.settings.has_terms?t("div",[t("inertia-link",{staticClass:"text-small text-medium-emphasis hover:text-high-emphasis border-b border-dotted",attrs:{href:e.route("page.show","terms-of-service")}},[e._v(" Terms Of Service ")])],1):e._e(),e.$page.props.settings.has_privacy?t("div",[t("inertia-link",{staticClass:"text-small text-medium-emphasis hover:text-high-emphasis border-b border-dotted",attrs:{href:e.route("page.show","privacy-policy")}},[e._v(" Privacy Policy ")])],1):e._e()]):e._e()],1)])],1)},p=[],d=n(l,m,p,!1,null,null,null,null);const C=d.exports;export{C as default};
