import{h}from"./index-38ad4957.js";import{c as createStyleSheet}from"./JSS-67b5cff8.js";import{A as AuthWrapper,a as AuthColumn,b as AuthButtonsContainer}from"./mixins-f750863a.js";import{T as TextSpanView}from"./sqm-text-span-view-72f43dff.js";var style={Wrapper:AuthWrapper,Column:AuthColumn,ButtonsContainer:AuthButtonsContainer,Banner:{"&::part(erroralert-base)":{margin:"15px 0px"}},CodeError:{"&::part(erroralert-base)":{"margin-bottom":"15px"}},CodeSuccess:{"&::part(successalert-base)":{"margin-bottom":"15px"}},ContinueButton:{width:"100%"}};var vanillaStyle="\n:host {\n  display: block;\n}\n:host([hidden]): {\n  display: none;\n}\n";var sheet=createStyleSheet(style);var styleString=sheet.toString();function PortalResetPasswordView(e){var t=e.states,s=e.callbacks;if(t.reset){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h(TextSpanView,{type:"h3"},t.content.resetPasswordHeader),h("sqm-form-message",{class:sheet.classes.CodeSuccess,exportparts:"success-icon"},h("div",{part:"successalert-text"},t.content.resetSuccessText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.gotoNextPage,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}if(t.oobCodeValidating){return h("div",null)}if(!t.oobCodeValid){return h("div",{class:sheet.classes.Wrapper+" "+sheet.classes.Column},h("style",{type:"text/css"},styleString),h("sqm-form-message",{class:sheet.classes.CodeError,type:"error",exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},t.content.codeInvalidText)),h("div",null,h("sl-button",{class:sheet.classes.ContinueButton,onClick:s.failed,exportparts:"base: primarybutton-base",type:"primary"},t.content.continueButtonText)))}return h("div",{class:sheet.classes.Wrapper},h("style",{type:"text/css"},vanillaStyle,styleString),h(TextSpanView,{type:"h2"},t.reset?t.content.passwordResetHeader:t.content.resetPasswordHeader),h("sl-form",{class:sheet.classes.Column,"onSl-submit":s.submit},e.states.error&&h("sqm-form-message",{type:"error",class:sheet.classes.Banner,exportparts:"erroralert-icon"},h("div",{part:"erroralert-text"},e.states.error)),!t.reset&&h("sqm-password-field",{fieldLabel:t.content.passwordFieldLabel,demoData:t.passwordDemoData,meetsRequirementsText:t.content.meetsRequirementsText,doesNotMeetRequirementsText:t.content.doesNotMeetRequirementsText,minErrorText:t.content.minErrorText,uppercaseErrorText:t.content.uppercaseErrorText,lowercaseErrorText:t.content.lowercaseErrorText,hasErrorText:t.content.hasErrorText}),!t.reset&&t.confirmPassword&&h("sl-input",{exportparts:"label: input-label, base: input-base",type:"password",name:"/confirmPassword",label:t.content.confirmPasswordFieldLabel,disabled:t.loading,required:true}),h("div",{class:sheet.classes.ButtonsContainer},h("sl-button",{class:sheet.classes.ContinueButton,submit:true,loading:t.loading,exportparts:"base: primarybutton-base",type:"primary"},t.reset?t.content.continueButtonText:t.content.resetPasswordButtonText))))}export{PortalResetPasswordView as P};