System.register(["./p-641f968d.system.js","./p-7265bbcb.system.js","./p-1a673057.system.js","./p-7562cd98.system.js"],(function(e){"use strict";var t,s,a,i;return{setters:[function(e){t=e.h},function(e){s=e.i},function(e){a=e.c},function(e){i=e.T}],execute:function(){e("P",l);function l(e){var l,r,n,o,d;var u=e.states,m=e.callbacks;var p=u.text,c=u.formState;var v=c.errors,b=c.error;var x={Container:{display:"flex",flexDirection:"column",gap:"var(--sl-spacing-xxx-large)",padding:"var(--sl-spacing-xxx-large)"},FormStyle:{width:"100%",minWidth:"700px","& >*:not(:last-child)":{"margin-bottom":"32px"},"@media screen and (max-width: 1100px)":{minWidth:"100%"}},Error:{"&::part(erroralert-base)":{"margin-bottom":"32px"}},Success:{"&::part(successalert-base)":{"margin-bottom":"32px"}},NameInputStyle:{width:"50%","@media screen and (max-width: 860px)":{width:"100%","margin-right":"0"}},NameInputContainer:{display:"flex",gap:"32px",width:"100%","@media screen and (max-width: 860px)":{flexDirection:"column"}}};var f=a(x);var g=f.toString();var y=((l=u.user)===null||l===void 0?void 0:l.countryCode)?s.formatDisplayName((r=u.user)===null||r===void 0?void 0:r.countryCode,{type:"region"}):"";return t("div",{class:f.classes.Container,part:"sqm-base"},t("style",{type:"text/css"},g),t(i,Object.assign({},{type:"h1"}),p.editProfileHeader),t(i,Object.assign({},{type:"h2"}),p.editProfileSubHeader),t("form",{class:f.classes.FormStyle,onSubmit:m.onSubmit},u.success&&t("sqm-form-message",{class:f.classes.Success,exportparts:"success-icon"},t("div",{part:"successalert-text"},p.submissionSuccessText)),b&&t("sqm-form-message",{class:f.classes.Error,type:"error",exportparts:"erroralert-icon"},t("div",{part:"erroralert-text"},b)),t("div",{class:f.classes.NameInputContainer},t("sl-input",Object.assign({class:f.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(n=u.user)===null||n===void 0?void 0:n.firstName,onInput:m.onChange,label:p.firstnametext,disabled:u.loading},(v===null||v===void 0?void 0:v.firstName)&&(v===null||v===void 0?void 0:v.firstName.status)!=="valid"?{class:"ErrorStyles",helpText:p.fieldEmptyText}:[],{id:"firstName",name:"firstName",error:(v===null||v===void 0?void 0:v.firstName)&&(v===null||v===void 0?void 0:v.firstName.status)!=="valid"?v===null||v===void 0?void 0:v.firstName.message:undefined})),t("sl-input",Object.assign({class:f.classes.NameInputStyle,exportparts:"label: input-label, base: input-base",value:(o=u.user)===null||o===void 0?void 0:o.lastName,onInput:m.onChange,label:p.lastnametext,disabled:u.loading,id:"lastName",name:"lastName"},(v===null||v===void 0?void 0:v.lastName)&&(v===null||v===void 0?void 0:v.lastName.status)!=="valid"?{class:"ErrorStyles",helpText:p.fieldEmptyText}:[],{error:(v===null||v===void 0?void 0:v.lastName)&&(v===null||v===void 0?void 0:v.lastName.status)!=="valid"?v===null||v===void 0?void 0:v.lastName.message:undefined}))),t("sl-input",{label:p.emailtext,value:(d=u.user)===null||d===void 0?void 0:d.email,exportparts:"label: input-label, base: input-base",disabled:true}),u.showCountry&&t("sl-input",{label:p.countrytext,value:y,exportparts:"label: input-label, base: input-base",disabled:true}),t("sl-button",{type:"primary",exportparts:"base: primarybutton-base",loading:u.loading,disabled:u.submitDisabled,onClick:function(e){m.onSubmit(e)},submit:true},p.submitChangeButtonText)))}}}}));