import{h as a}from"./p-083180bf.js";import{c as e}from"./p-cef45012.js";import{A as r,g as s,a as t,b as l,E as o}from"./p-49b20dae.js";const n=e({Wrapper:{...r,...s({direction:"column",size:"var(--sl-spacing-small)"})},Column:t,ForgotButtonContainer:{display:"inline",cursor:"pointer","font-size":"13px","font-weight":"600",color:"#AAAAAA",margin:"0"},ButtonsContainer:l,ErrorStyle:o}),i=n.toString();function p(e){var r,s,t,l;const{states:o,callbacks:p,content:d}=e,m=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return a("div",{part:"sqm-base",class:n.classes.Wrapper,style:{border:d.hideBorder?"none":"var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",backgroundColor:d.backgroundColor,"padding-top":`var(--sl-spacing-${d.paddingTop})`,"padding-right":`var(--sl-spacing-${d.paddingRight})`,"padding-bottom":`var(--sl-spacing-${d.paddingBottom})`,"padding-left":`var(--sl-spacing-${d.paddingLeft})`}},a("style",{type:"text/css"},"\n:host {\n  display: block;\n}\n:host([hidden]): {\n  display: none;\n}\na svg {\n  margin: 0 auto;\n  display: block;\n}\n",i),d.topSlot,a("sl-form",{class:n.classes.Column,"onSl-submit":p.submit},e.states.error&&(c=e.content.fraudErrorMessage,"FRAUD"===(b=e.states.error)?a("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},a("b",null,e.content.fraudErrorMessageTitle),a("div",{part:"erroralert-text"},c)):a("sqm-form-message",{type:"error",exportparts:"erroralert-icon"},a("div",{part:"erroralert-text"},b))),d.includeName&&a("sl-input",{exportparts:"label: input-label, base: input-base",type:"name",name:"/firstName",label:d.firstNameLabel||"First Name",disabled:o.loading}),d.includeName&&a("sl-input",{exportparts:"label: input-label, base: input-base",type:"name",name:"/lastName",label:d.lastNameLabel||"Last Name",disabled:o.loading}),a("sl-input",Object.assign({exportparts:"label: input-label, base: input-base",type:"email",name:"/email",label:d.emailLabel||"Email",disabled:o.loading,required:!0,validationError:({value:a})=>a?a.match(m)?void 0:d.invalidEmailErrorMessage:d.requiredFieldErrorMessage},(null===(s=null===(r=o.registrationFormState)||void 0===r?void 0:r.validationErrors)||void 0===s?void 0:s.email)?{class:n.classes.ErrorStyle,helpText:(null===(l=null===(t=o.registrationFormState)||void 0===t?void 0:t.validationErrors)||void 0===l?void 0:l.email)||d.requiredFieldErrorMessage}:[])),a("div",{class:n.classes.ButtonsContainer,style:{paddingTop:d.includeName?"var(--sl-spacing-medium)":"0"}},a("sl-button",{submit:!0,loading:o.loading,exportparts:"base: primarybutton-base",type:"primary"},d.registerLabel||"Registration"))),d.bottomSlot);var b,c}export{p as E}