import n from"./TextDivider.54add59f.js";import l from"./FormInput.7debc7c5.js";import p from"./ErrorText.b141a597.js";import c from"./Button.f17dffc9.js";import f from"./Container.f87d9f62.js";import{u as d}from"./notification.db2f2ae7.js";import{n as _}from"./plugin-vue2_normalizer.000ba15c.js";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";import"./app.79e1f42d.js";const u={metaInfo(){return{title:`${this.__("Register")}`}},components:{TextDivider:n,FormInput:l,Button:c,Container:f,ErrorText:p},data(){return{sending:!1,form:{terms:!1,name:null,email:null,password:null,password_confirmation:null}}},methods:{useNotification:d,submit(){this.$inertia.post(this.route("register"),this.form,{onStart:()=>this.sending=!0,onFinish:()=>this.sending=!1})}}};var g=function(){var e=this,r=e._self._c;return r("div",{staticClass:"flex items-center justify-center w-full min-h-screen"},[r("Container",{attrs:{size:"small"}},[r("form",{staticClass:"space-y-4",on:{submit:function(s){return s.preventDefault(),e.submit.apply(null,arguments)}}},[r("div",{staticClass:"flex flex-col items-center space-y-5"},[e.$page.props.settings.logo?r("img",{staticClass:"h-14",attrs:{src:e.$page.props.settings.logo}}):e._e(),r("h1",{staticClass:"font-semibold text-center text-title"},[e._v(" "+e._s(e.__("Register"))+" ")])]),r("FormInput",{attrs:{label:e.__("Name"),errors:e.$page.props.errors.name,id:"name",type:"text",required:""},model:{value:e.form.name,callback:function(s){e.$set(e.form,"name",s)},expression:"form.name"}}),r("FormInput",{attrs:{label:e.__("Email"),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"}}),r("FormInput",{attrs:{label:e.__("Password"),errors:e.$page.props.errors.password,id:"password",type:"password",required:""},model:{value:e.form.password,callback:function(s){e.$set(e.form,"password",s)},expression:"form.password"}}),r("FormInput",{attrs:{label:e.__("Confirm password"),errors:e.$page.props.errors.password_confirmation,id:"password_confirmation",type:"password",required:""},model:{value:e.form.password_confirmation,callback:function(s){e.$set(e.form,"password_confirmation",s)},expression:"form.password_confirmation"}}),e.$page.props.settings.accept_terms_required?r("div",[r("input",{directives:[{name:"model",rawName:"v-model",value:e.form.terms,expression:"form.terms"}],staticClass:"form-checkbox",attrs:{id:"terms_required",type:"checkbox"},domProps:{checked:Array.isArray(e.form.terms)?e._i(e.form.terms,null)>-1:e.form.terms},on:{change:function(s){var t=e.form.terms,a=s.target,m=!!a.checked;if(Array.isArray(t)){var i=null,o=e._i(t,i);a.checked?o<0&&e.$set(e.form,"terms",t.concat([i])):o>-1&&e.$set(e.form,"terms",t.slice(0,o).concat(t.slice(o+1)))}else e.$set(e.form,"terms",m)}}}),r("label",{staticClass:"ml-2 text-sm",attrs:{for:"terms_required"}},[e._v(" "+e._s(e.__("Accept terms of service"))+" ")]),e.$page.props.errors.terms?r("ErrorText",[e._v(e._s(e.$page.props.errors.terms[0]))]):e._e()],1):e._e(),r("Button",{attrs:{variant:"primary",disabled:e.sending,block:""}},[e._v(e._s(e.__("Register")))]),r("TextDivider",[e._v(e._s(e.__("Or")))]),r("div",{staticClass:"space-y-3"},[r("Button",{attrs:{as:"inertia-link",href:e.route("login"),variant:"secondary",block:""}},[e._v(e._s(e.__("Login")))])],1),e.$page.props.settings.has_terms?r("TextDivider",{attrs:{"without-text":!0}}):e._e(),e.$page.props.settings.has_terms||e.$page.props.settings.has_privacy?r("div",{staticClass:"flex justify-between"},[e.$page.props.settings.has_terms?r("div",[r("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?r("div",[r("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)},v=[],h=_(u,g,v,!1,null,null,null,null);const P=h.exports;export{P as default};
