'use strict';
import { routes } from '../../../../fd-toolbox/routing/routes.js';
import { authTypes } from '../../../meta/auth/login.js';
import { buildUrl } from '../../../../fd-toolbox/url/urls.js';
import { register } from '../auth-register.js';

var __defProp=Object['defineProperty'],__name=(_0xc75741,_0x335685)=>__defProp(_0xc75741,'name',{'value':_0x335685,'configurable':!![]});async function defaultRegister(_0x393842,_0x9b495b='',_0x52f8a4){const _0x5d73bf={'authType':authTypes['default'],'password':_0x393842,'email':_0x9b495b,'workspaceUserInviteId':_0x52f8a4};return register(_0x5d73bf);}__name(defaultRegister,'defaultRegister');async function onRegisterSubmit(_0x24334a,_0x208132,_0x9bcbf5,_0x468d37){const _0x4f13ad=await defaultRegister(_0x24334a['password'],_0x24334a['email'],_0x468d37);if(!_0x4f13ad['isSuccess']){_0x9bcbf5(_0x4f13ad['message']);return;}const _0x6b51e8=buildUrl(routes['login']);_0x208132['push'](_0x6b51e8);}__name(onRegisterSubmit,'onRegisterSubmit');

export { defaultRegister, onRegisterSubmit };
